¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Segmentation fault


 

Ok, found the problem.....

I had a forward script where a couple of lines started with a #

Something like this...

#att 1
#c gb7iow
#bbs

This gives a seg fault...

If you have something like this...

#att 1
#c gb7iow
#bbs
times 0800-1959
att 5
radio 7.049450 USB-D
c gb7iow
bbs

There is no problem.

Sorry about the noise.
I still don`t understand why I put a #hash in front of it ;)

73 Niels PD9Q

Op 25-10-2024 om 21:39 schreef John G8BPQ:

Can you look in the BBS log and see if it has recorded the call of the bbs it is trying to connect to. The segfault may have disrupted the logging, but if not disable forwarding the the bbs it was trying to connect to and check the connect script. If there isn't anything helpful in the log you could try starting forwarding to each bbs in turn and see which one is causing the problem..
73,
John



On 25/10/2024 18:14, Niels PD9Q wrote:
Hi John,

Just the same output...

Thread 1 "pilinbpq" received signal SIGSEGV, Segmentation fault.
0x00129f98 in memicmp (a=0x0, b=0x265dc4 "TIMES", n=5) at /mnt/Source/bpq32/CommonSource/compatbits.c:72
72????? /mnt/Source/bpq32/CommonSource/compatbits.c: Bestand of map bestaat niet.
(gdb)
(gdb) (here are the enters)
(gdb) bt
#0? 0x00129f98 in memicmp (a=0x0, b=0x265dc4 "TIMES", n=5) at /mnt/Source/bpq32/CommonSource/compatbits.c:72
#1? 0x000eda88 in ProcessBBSConnectScript (conn=0x3bd118 <Connections+5568>, Buffer=0x7efff3f8 "*** CONNECTED? ", len=15) at /mnt/Source/bpq32/CommonSource/BBSUtilities.c:8139
#2? 0x000f5eac in Connected (Stream=19) at /mnt/Source/bpq32/CommonSource/BBSUtilities.c:10496
#3? 0x001681e4 in PollStreams () at /mnt/Source/bpq32/CommonSource/LinBPQ.c:2041
#4? 0x001676c8 in main (argc=1, argv=0x7efff774) at /mnt/Source/bpq32/CommonSource/LinBPQ.c:1555
(gdb)

I delete all the times in the forward scripts.....

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./pilinbpq...done.
(gdb) r
Starting program: /home/pi/linbpq/pilinbpq
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
G8BPQ AX25 Packet Switch System Version 6.0.24.47 October 2024
Copyright ? 2001-2024 John Wiseman G8BPQ
Current Directory is /home/pi/linbpq
Log Directory is /home/pi/linbpq
Making Directory /home/pi/linbpq/logs
Configuration file Preprocessor.
Using Configuration file /home/pi/linbpq/bpq32.cfg
Conversion (probably) successful

PORTS 0x2eb320 LINKS 0x2f2b30 DESTS 0x2f6640 ROUTES 0x303640 L4 0x306a40 BUFFERS 0x314380

[New Thread 0x76d64440 (LWP 13385)]
Initialising Port 01???? UZ7HO Host 44.137.31.76 Port 8101 Chan A
[New Thread 0x76563440 (LWP 13386)]
Initialising Port 02???? UZ7HO Host 44.137.31.76 Port 8101 Chan B
Initialising Port 03???? ARDOP Host 44.137.31.76 8515
[New Thread 0x75d62440 (LWP 13387)]
Initialising Port 04???? VARA Host 44.137.31.76 8300
[New Thread 0x75561440 (LWP 13388)]
Initialising Port 05???? UZ7HO Host 44.137.31.76 Port 8101 Chan C
Initialising Port 06???? ASYNC /dev/ttyUSB0 Chan A
[New Thread 0x74d60440 (LWP 13389)]
[New Thread 0x7455f440 (LWP 13390)]
Initialising Port 07???? AXIP
[Thread 0x7455f440 (LWP 13390) exited]
[New Thread 0x7455f440 (LWP 13391)]
Initialising Port 08???? Telnet Server
[New Thread 0x739ff440 (LWP 13392)]

Rig Control Enabled
[New Thread 0x731fe440 (LWP 13393)]
MQTT Enabled 0
[New Thread 0x729fd440 (LWP 13394)]
Starting Chat
Config File is /home/pi/linbpq/chatconfig.cfg
Chat Started
Starting Mail
Config File is /home/pi/linbpq/linmail.cfg
Config Processed
[Thread 0x7455f440 (LWP 13391) exited]
[New Thread 0x7455f440 (LWP 13401)]
[New Thread 0x72184440 (LWP 13402)]
Mail Started
slave device: /dev/pts/0. symlink to /home/pi/fbbded created
TNC Emulator Init Complete
[New Thread 0x71983440 (LWP 13403)]
[Thread 0x76563440 (LWP 13386) exited]
Connected to ARDOP TNC Port 3
Connected to VARA TNC Port 4
[New Thread 0x76563440 (LWP 17063)]
[Thread 0x76563440 (LWP 17063) exited]
[New Thread 0x76563440 (LWP 20741)]
[Thread 0x76563440 (LWP 20741) exited]
[New Thread 0x76563440 (LWP 24399)]
[Thread 0x76563440 (LWP 24399) exited]
[New Thread 0x76563440 (LWP 28060)]
[Thread 0x76563440 (LWP 28060) exited]

Thread 1 "pilinbpq" received signal SIGSEGV, Segmentation fault.
0x00129f98 in memicmp (a=0x0, b=0x265dc4 "TIMES", n=5) at /mnt/Source/bpq32/CommonSource/compatbits.c:72
72????? /mnt/Source/bpq32/CommonSource/compatbits.c: Bestand of map bestaat niet.
(gdb)
(gdb)
(gdb) bt
#0? 0x00129f98 in memicmp (a=0x0, b=0x265dc4 "TIMES", n=5) at /mnt/Source/bpq32/CommonSource/compatbits.c:72
#1? 0x000eda88 in ProcessBBSConnectScript (conn=0x3bd118 <Connections+5568>, Buffer=0x7efff3f8 "*** CONNECTED? ", len=15) at /mnt/Source/bpq32/CommonSource/BBSUtilities.c:8139
#2? 0x000f5eac in Connected (Stream=19) at /mnt/Source/bpq32/CommonSource/BBSUtilities.c:10496
#3? 0x001681e4 in PollStreams () at /mnt/Source/bpq32/CommonSource/LinBPQ.c:2041
#4? 0x001676c8 in main (argc=1, argv=0x7efff774) at /mnt/Source/bpq32/CommonSource/LinBPQ.c:1555
(gdb) quit
A debugging session is active.

??????? Inferior 1 [process 13376] will be killed.

Quit anyway? (y or n) y

73 Niels PD9Q

Op 25-10-2024 om 13:07 schreef John G8BPQ:
Can you try running under gdb?



Thanks,
John


On 25/10/2024 05:37, Niels PD9Q wrote:
Hi,

Lately I've been having? about every hour a segmentation fault with pilinbpq.

I don`t understand why.

Thanks.

73 Niels PD9Q

Oct 24 05:30:52 pi1lap bash[19835]: /home/pi/linbpq/linbpq.start: regel 11: 19838 Segmentatiefout???????? ./pilinbpq
Oct 24 05:30:52 pi1lap systemd[1]: linbpq.service: Main process exited, code=exited, status=139/n/a
Oct 24 05:30:52 pi1lap systemd[1]: linbpq.service: Failed with result 'exit-code'.
Oct 24 05:30:57 pi1lap systemd[1]: linbpq.service: Service RestartSec=5s expired, scheduling restart.
Oct 24 05:30:57 pi1lap systemd[1]: linbpq.service: Scheduled restart job, restart counter is at 23.
Oct 24 05:30:57 pi1lap systemd[1]: Stopped Linbpq Daemon.
Oct 24 05:30:57 pi1lap systemd[1]: Started Linbpq Daemon.
Oct 24 05:30:57 pi1lap bash[2341]: G8BPQ AX25 Packet Switch System Version 6.0.24.47 October 2024

pi@pi1lap:~/linbpq $ sudo gdb ./pilinbpq
GNU gdb (Raspbian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<>.
Find the GDB manual and other documentation resources online at:
??? <>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./pilinbpq...done.
(gdb) r
Starting program: /home/pi/linbpq/pilinbpq
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
G8BPQ AX25 Packet Switch System Version 6.0.24.47 October 2024
Copyright ? 2001-2024 John Wiseman G8BPQ
Current Directory is /home/pi/linbpq
Log Directory is /home/pi/linbpq
Making Directory /home/pi/linbpq/logs
Configuration file Preprocessor.
Using Configuration file /home/pi/linbpq/bpq32.cfg
Conversion (probably) successful

PORTS 0x2eb320 LINKS 0x2f2b30 DESTS 0x2f6640 ROUTES 0x303640 L4 0x306a40 BUFFERS 0x314380

[New Thread 0x76d64440 (LWP 30794)]
Initialising Port 01???? UZ7HO Host 44.137.31.76 Port 8101 Chan A
[New Thread 0x76563440 (LWP 30795)]
Initialising Port 02???? UZ7HO Host 44.137.31.76 Port 8101 Chan B
Initialising Port 03???? ARDOP Host 44.137.31.76 8515
[New Thread 0x75d62440 (LWP 30796)]
Initialising Port 04???? VARA Host 44.137.31.76 8300
[New Thread 0x75561440 (LWP 30797)]
Initialising Port 05???? UZ7HO Host 44.137.31.76 Port 8101 Chan C
Initialising Port 06???? ASYNC /dev/ttyUSB0 Chan A
[New Thread 0x74d60440 (LWP 30798)]
[New Thread 0x7455f440 (LWP 30799)]
Initialising Port 07???? AXIP
[New Thread 0x739ff440 (LWP 30800)]
Initialising Port 08???? Telnet Server
[New Thread 0x7455f440 (LWP 30801)]
[Thread 0x7455f440 (LWP 30799) exited]

Rig Control Enabled
[New Thread 0x731fe440 (LWP 30802)]
MQTT Enabled 0
[New Thread 0x729fd440 (LWP 30803)]
Starting Chat
Config File is /home/pi/linbpq/chatconfig.cfg
Chat Started
Starting Mail
Config File is /home/pi/linbpq/linmail.cfg
Config Processed
[Thread 0x739ff440 (LWP 30800) exited]
[New Thread 0x739ff440 (LWP 30808)]
[New Thread 0x721e7440 (LWP 30809)]
Mail Started
slave device: /dev/pts/0. symlink to /home/pi/fbbded created
TNC Emulator Init Complete
[New Thread 0x719e6440 (LWP 30810)]
[Thread 0x76563440 (LWP 30795) exited]
Connected to ARDOP TNC Port 3
Connected to VARA TNC Port 4
[New Thread 0x76563440 (LWP 744)]
[Thread 0x76563440 (LWP 744) exited]
[New Thread 0x76563440 (LWP 2172)]
[Thread 0x76563440 (LWP 2172) exited]
[New Thread 0x76563440 (LWP 5892)]
[Thread 0x76563440 (LWP 5892) exited]
[New Thread 0x76563440 (LWP 9581)]
[Thread 0x76563440 (LWP 9581) exited]
[New Thread 0x76563440 (LWP 13243)]
[Thread 0x76563440 (LWP 13243) exited]

Thread 1 "pilinbpq" received signal SIGSEGV, Segmentation fault.
0x00129f98 in memicmp (a=0x0, b=0x265dc4 "TIMES", n=5) at /mnt/Source/bpq32/CommonSource/compatbits.c:72
72????? /mnt/Source/bpq32/CommonSource/compatbits.c: Bestand of map bestaat niet.
(gdb) bt
#0? 0x00129f98 in memicmp (a=0x0, b=0x265dc4 "TIMES", n=5) at /mnt/Source/bpq32/CommonSource/compatbits.c:72
#1? 0x000eda88 in ProcessBBSConnectScript (conn=0x3bce60 <Connections+4872>, Buffer=0x7efff3f8 "*** CONNECTED ", len=15) at /mnt/Source/bpq32/CommonSource/BBSUtilities.c:8139
#2? 0x000f5eac in Connected (Stream=18) at /mnt/Source/bpq32/CommonSource/BBSUtilities.c:10496
#3? 0x001681e4 in PollStreams () at /mnt/Source/bpq32/CommonSource/LinBPQ.c:2041
#4? 0x001676c8 in main (argc=1, argv=0x7efff774) at /mnt/Source/bpq32/CommonSource/LinBPQ.c:1555
(gdb)















Join [email protected] to automatically receive all group messages.