* mesh-cfgclient fails with 'Segmentation fault'
[not found] <mail.950b9bbe-7735-4634-bbe9-de9ff9bc7bd4@storage.wm.amazon.com>
@ 2019-12-17 15:10 ` Yury Galustov
2019-12-17 15:34 ` Michał Lowas-Rzechonek
0 siblings, 1 reply; 4+ messages in thread
From: Yury Galustov @ 2019-12-17 15:10 UTC (permalink / raw)
To: linux-bluetooth
Hi,
Just trying to use mesh-cfgclient to provision devices using PB-ADV using Raspberry Pi4.
Kernel has these options enabled:
# Hash Modes → CMAC support
# Random Number Generation → User-space interface for hash algorithms
# Random Number Generation → User-space interface for symmetric key cipher algorithms
# Random Number Generation → User-space interface for AEAD cipher algorithms
`bluetooth-meshd --nodetach --debug --dbus-debug` runs with no issues and showing some binary data when I launch mesh-cfgclient.
But when I run 'create' command, it fails with 'Segmentation fault':
pi@raspberrypi:~/bluez-master $ ./tools/mesh-cfgclient
Warning: config file "/home/pi/.config/meshcfg/config_db.json" not found
[mesh-cfgclient]# create
Segmentation fault
Happy to debug the code if somebody would explain how )
Any ideas?
Thanks,
Yury
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mesh-cfgclient fails with 'Segmentation fault'
2019-12-17 15:10 ` mesh-cfgclient fails with 'Segmentation fault' Yury Galustov
@ 2019-12-17 15:34 ` Michał Lowas-Rzechonek
[not found] ` <mail.818c9bc4-2f51-4df1-a8f3-a37c0d84cc99@storage.wm.amazon.com>
0 siblings, 1 reply; 4+ messages in thread
From: Michał Lowas-Rzechonek @ 2019-12-17 15:34 UTC (permalink / raw)
To: Yury Galustov; +Cc: linux-bluetooth
On 12/17, Yury Galustov wrote:
> pi@raspberrypi:~/bluez-master $ ./tools/mesh-cfgclient
> Warning: config file "/home/pi/.config/meshcfg/config_db.json" not found
>
> [mesh-cfgclient]# create
> Segmentation fault
>
> Happy to debug the code if somebody would explain how )
You might try running it under a debugger:
$ gdb ./tools/mesh-cfgclient -ex run
and capture the backtrace via "bt" command.
Although honestly, I'd recommend playing with D-Bus API directly, e.g.
in Python.
The command line is a bit alpha.
--
Michał Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>
Silvair http://silvair.com
Jasnogórska 44, 31-358 Krakow, POLAND
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: mesh-cfgclient fails with 'Segmentation fault'
[not found] ` <mail.818c9bc4-2f51-4df1-a8f3-a37c0d84cc99@storage.wm.amazon.com>
@ 2019-12-17 16:19 ` Yury Galustov
2019-12-17 16:55 ` Gix, Brian
0 siblings, 1 reply; 4+ messages in thread
From: Yury Galustov @ 2019-12-17 16:19 UTC (permalink / raw)
To: Michał Lowas-Rzechonek; +Cc: linux-bluetooth
Hi Michał,
Thanks for the quick response.
> On 12/17, Yury Galustov wrote:
> > pi@raspberrypi:~/bluez-master $ ./tools/mesh-cfgclient
> > Warning: config file "/home/pi/.config/meshcfg/config_db.json" not found
> >
> > [mesh-cfgclient]# create
> > Segmentation fault
> >
> > Happy to debug the code if somebody would explain how )
>
> You might try running it under a debugger:
> $ gdb ./tools/mesh-cfgclient -ex run
> and capture the backtrace via "bt" command.
>
> Although honestly, I'd recommend playing with D-Bus API directly, e.g.
> in Python.
>
> The command line is a bit alpha.
>
> --
> Michał Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>
> Silvair http://silvair.com
> Jasnogórska 44, 31-358 Krakow, POLAND
Warning: config file "/home/pi/.config/meshcfg/config_db.json" not found
[mesh-cfgclient]# create
Program received signal SIGSEGV, Segmentation fault.
l_dbus_proxy_method_call (proxy=0x0, method=method@entry=0x342c0 "CreateNetwork", setup=setup@entry=0x14fa0 <create_net_setup>,
reply=reply@entry=0x14e04 <create_net_reply>, user_data=0x0, destroy=0x0) at ell/dbus-client.c:304
304 req = l_new(struct method_call_request, 1);
(gdb) bt
#0 l_dbus_proxy_method_call (proxy=0x0, method=method@entry=0x342c0 "CreateNetwork", setup=setup@entry=0x14fa0 <create_net_setup>,
reply=reply@entry=0x14e04 <create_net_reply>, user_data=0x0, destroy=0x0) at ell/dbus-client.c:304
#1 0x00015b00 in cmd_create_network (argc=<optimized out>, argv=<optimized out>) at tools/mesh-cfgclient.c:711
#2 0x0001e398 in cmd_exec (argv=0x69308, argc=1, entry=0x33210 <main_menu+8>) at src/shared/shell.c:441
#3 menu_exec (entry=0x33210 <main_menu+8>, argc=argc@entry=1, argv=argv@entry=0x69308) at src/shared/shell.c:468
#4 0x0001e730 in shell_exec (argc=1, argv=0x69308) at src/shared/shell.c:511
#5 0x0001f684 in rl_handler (input=0x69068 "create") at src/shared/shell.c:713
#6 0xb6f7cdc0 in rl_callback_read_char () from /lib/arm-linux-gnueabihf/libreadline.so.7
#7 0x0001e608 in input_read (io=<optimized out>, user_data=<optimized out>) at src/shared/shell.c:1256
#8 0x00022f9c in io_callback (fd=<optimized out>, events=1, user_data=0x69280) at ell/io.c:126
#9 0x00023e28 in l_main_iterate (timeout=<optimized out>) at ell/main.c:470
#10 0x00023ef0 in l_main_run () at ell/main.c:520
#11 l_main_run () at ell/main.c:502
#12 0x00024150 in l_main_run_with_signal (callback=<optimized out>, user_data=user_data@entry=0x0) at ell/main.c:642
#13 0x000202d0 in mainloop_run_with_signal (func=<optimized out>, user_data=user_data@entry=0x0) at src/shared/mainloop-ell.c:87
#14 0x0001f90c in bt_shell_run () at src/shared/shell.c:1174
#15 0x00012980 in main (argc=<optimized out>, argv=<optimized out>) at tools/mesh-cfgclient.c:1982
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mesh-cfgclient fails with 'Segmentation fault'
2019-12-17 16:19 ` Yury Galustov
@ 2019-12-17 16:55 ` Gix, Brian
0 siblings, 0 replies; 4+ messages in thread
From: Gix, Brian @ 2019-12-17 16:55 UTC (permalink / raw)
To: yury, michal.lowas-rzechonek; +Cc: linux-bluetooth, Stotland, Inga
Hi Yury,
On Tue, 2019-12-17 at 16:19 +0000, Yury Galustov wrote:
> Hi Michał,
> Thanks for the quick response.
>
> > On 12/17, Yury Galustov wrote:
> > > pi@raspberrypi:~/bluez-master $ ./tools/mesh-cfgclient
> > > Warning: config file "/home/pi/.config/meshcfg/config_db.json" not found
> > >
> > > [mesh-cfgclient]# create
> > > Segmentation fault
> > >
> > > Happy to debug the code if somebody would explain how )
> >
> > You might try running it under a debugger:
> > $ gdb ./tools/mesh-cfgclient -ex run
> > and capture the backtrace via "bt" command.
> >
> > Although honestly, I'd recommend playing with D-Bus API directly, e.g.
> > in Python.
> >
> > The command line is a bit alpha.
> >
> > --
> > Michał Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>
> > Silvair http://silvair.com
> > Jasnogórska 44, 31-358 Krakow, POLAND
>
> Warning: config file "/home/pi/.config/meshcfg/config_db.json" not found
> [mesh-cfgclient]# create
>
> Program received signal SIGSEGV, Segmentation fault.
> l_dbus_proxy_method_call (proxy=0x0, method=method@entry=0x342c0 "CreateNetwork", setup=setup@entry=0x14fa0
> <create_net_setup>,
This failure occurs (with proxy=NULL) when the bluetooth-meshd daemon is running, but it was unable to find an
LE capable BT controller. This is a lnown issue, that we should probably put in the bluez/tools/mesh/README
file... But for now there are a few ways to address it:
1. Make sure that the bluetoothd daemon is not claiming all the BT controllers. If you have multiple BT
controllers in your system, change the following value in your /etc/bluetooth/main.conf file:
[Policy]
AutoEnable=false
With AutoEnable true, bluetoothd claims all controllers. (bluetoothd must be restarted for change to take
effect).
2. If you have only one BT controller in your system, you *must* disable bluetooth daemon to use mesh-
bluetooth... To disable bluetoothd entirely (leaving the controller(s) to bluetooth-meshd) disable and stop
the main bluetooth daemon:
# systemctl disable bluetooth
# systemctl stop bluetooth
We hope to get the two daemons to co-exist at some point, but that will require kernel changes, so for now
these are your two choices.
> reply=reply@entry=0x14e04 <create_net_reply>, user_data=0x0, destroy=0x0) at ell/dbus-client.c:304
> 304 req = l_new(struct method_call_request, 1);
> (gdb) bt
> #0 l_dbus_proxy_method_call (proxy=0x0, method=method@entry=0x342c0 "CreateNetwork", setup=setup@entry=0x14f
> a0 <create_net_setup>,
> reply=reply@entry=0x14e04 <create_net_reply>, user_data=0x0, destroy=0x0) at ell/dbus-client.c:304
> #1 0x00015b00 in cmd_create_network (argc=<optimized out>, argv=<optimized out>) at tools/mesh-
> cfgclient.c:711
> #2 0x0001e398 in cmd_exec (argv=0x69308, argc=1, entry=0x33210 <main_menu+8>) at src/shared/shell.c:441
> #3 menu_exec (entry=0x33210 <main_menu+8>, argc=argc@entry=1, argv=argv@entry=0x69308) at
> src/shared/shell.c:468
> #4 0x0001e730 in shell_exec (argc=1, argv=0x69308) at src/shared/shell.c:511
> #5 0x0001f684 in rl_handler (input=0x69068 "create") at src/shared/shell.c:713
> #6 0xb6f7cdc0 in rl_callback_read_char () from /lib/arm-linux-gnueabihf/libreadline.so.7
> #7 0x0001e608 in input_read (io=<optimized out>, user_data=<optimized out>) at src/shared/shell.c:1256
> #8 0x00022f9c in io_callback (fd=<optimized out>, events=1, user_data=0x69280) at ell/io.c:126
> #9 0x00023e28 in l_main_iterate (timeout=<optimized out>) at ell/main.c:470
> #10 0x00023ef0 in l_main_run () at ell/main.c:520
> #11 l_main_run () at ell/main.c:502
> #12 0x00024150 in l_main_run_with_signal (callback=<optimized out>, user_data=user_data@entry=0x0) at
> ell/main.c:642
> #13 0x000202d0 in mainloop_run_with_signal (func=<optimized out>, user_data=user_data@entry=0x0) at
> src/shared/mainloop-ell.c:87
> #14 0x0001f90c in bt_shell_run () at src/shared/shell.c:1174
> #15 0x00012980 in main (argc=<optimized out>, argv=<optimized out>) at tools/mesh-cfgclient.c:1982
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-17 16:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <mail.950b9bbe-7735-4634-bbe9-de9ff9bc7bd4@storage.wm.amazon.com>
2019-12-17 15:10 ` mesh-cfgclient fails with 'Segmentation fault' Yury Galustov
2019-12-17 15:34 ` Michał Lowas-Rzechonek
[not found] ` <mail.818c9bc4-2f51-4df1-a8f3-a37c0d84cc99@storage.wm.amazon.com>
2019-12-17 16:19 ` Yury Galustov
2019-12-17 16:55 ` Gix, Brian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).