Project

General

Profile

Actions

Bug #6144

closed

segfault when trying to parse "dev-args" param

Added by fixeria 9 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
08/24/2023
Due date:
% Done:

0%

Spec Reference:

Description

Today I upgraded all osmo-{ran,cni} components to recent master:

libosmocore.git 0ef0a1cb1ea62800e3035c48d1a59d9d2d29d2d8
osmo-trx.git f57a86131ef48511fa92771ba008bc30e6ee9c3e
...

Now when I tried to start osmo-trx-uhd, it crashes while parsing the configuration file:

(gdb) bt
#0  0x00007ffff608e83c in ?? () from /usr/lib/libc.so.6
#1  0x00007ffff603e668 in raise () from /usr/lib/libc.so.6
#2  0x00007ffff60264b8 in abort () from /usr/lib/libc.so.6
#3  0x00007ffff7e5f0d3 in ?? () from /usr/lib/libtalloc.so.2
#4  0x000055555559cf3e in osmo_talloc_replace_string (newstr=0x5555557387c0 "type=b200", dst=0x5555555eac80, ctx=0x5555555eac70)
    at /usr/local/include/osmocom/core/utils.h:135
#5  cfg_dev_args (self=<optimized out>, vty=<optimized out>, argc=<optimized out>, argv=<optimized out>) at ../../../src/osmo-trx/CommonLibs/trx_vty.c:166
#6  0x00007ffff7ecb1bd in cmd_execute_command_strict (vline=0x555555738940, vty=vty@entry=0x5555556c8d70, cmd=cmd@entry=0x0)
    at ../../../../src/libosmocore/src/vty/command.c:2835
#7  0x00007ffff7ecb322 in config_from_file (vty=vty@entry=0x5555556c8d70, fp=fp@entry=0x555555736850) at ../../../../src/libosmocore/src/vty/command.c:2948
#8  0x00007ffff7ece8db in vty_read_config_filep (confp=confp@entry=0x555555736850, priv=priv@entry=0x0) at ../../../../src/libosmocore/src/vty/vty.c:1529
#9  0x00007ffff7ecf032 in vty_read_config_file (file_name=0x7fffffffe357 "/etc/osmocom/osmo-trx-uhd.cfg", priv=0x0) at ../../../../src/libosmocore/src/vty/vty.c:1920
#10 0x0000555555565e41 in main (argc=<optimized out>, argv=<optimized out>) at ../../../src/osmo-trx/Transceiver52M/osmo-trx.cpp:638

I am attaching my config file for reference.


Files

osmo-trx-uhd.cfg osmo-trx-uhd.cfg 650 Bytes fixeria, 08/24/2023 06:06 AM
Actions #1

Updated by fixeria 9 months ago

Looking at the backtrace it can be seen that the exact line causing the failure is dev-args type=b200.
If I remove/comment out this line, the process starts correctly (like it did before).

Actions #2

Updated by fixeria 9 months ago

  • Subject changed from segfault when trying to parse the VTY config file to segfault when trying to parse "dev-args" param
  • Assignee changed from fixeria to Hoernchen

git bisect tells me:

19e134a626abdb99435d96b0bfcc46b0804715e5 is the first bad commit
commit 19e134a626abdb99435d96b0bfcc46b0804715e5
Author: Eric <ewild@sysmocom.de>
Date:   Wed May 10 23:50:38 2023 +0200

    transceiver: pass cfg struct instead of args

    Passing 7 args is a bit much, just pass the config struct instead.

    Change-Id: I48386900d15ff4d770c70a4efc246d32f921904b

This patch was merged in July, about a month ago. Hoernchen assigning to you, please fix.

Actions #3

Updated by Hoernchen 9 months ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)