Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segmentation fault using the random device #17

Open
Yuval91 opened this issue Feb 13, 2020 · 3 comments
Open

segmentation fault using the random device #17

Yuval91 opened this issue Feb 13, 2020 · 3 comments

Comments

@Yuval91
Copy link

Yuval91 commented Feb 13, 2020

Hi,
So I installed the rcdaq system using the instructions on https://www.phenix.bnl.gov/~purschke/rcdaq/rcdaq_doc.pdf and tried to follow the procedure with the random device described on page 10. After using:
rcdaq_client daq_begin 1
On the client terminal, I got the following output on the server terminal:

Event id 1 size 44
trigger loop created 
Segmentation fault (core dumped)

I would mention that previously I had a problem with registration so I started "/etc/sysconfig/rpcbind" and only then the rcdaq_server started properly.

I would appreciate your help.

@mpurschke
Copy link
Contributor

mpurschke commented Feb 13, 2020

Hmmm... we have dozens of installations and I don't see that. Which linux flavor are you using?

Please run the rcdaq_server under debugger control and find out where it segfaults. Did you have data logging turned on?

Can you make sure you have no server running and execute the reference setup.sh script that comes with the project and try to take some data?

BTW, the rpcbind stuff is explained in chapter 12.

Let's see what gives.

@Yuval91
Copy link
Author

Yuval91 commented Feb 18, 2020

Hi,
First thanks for replaying!
I tried to install on three different computers, all with fedora (29, 30 and 31) and got the same problem.
The setup.sh script gives me an error: "rcdaq_client: command not found". I find it puzzling because the rcdaq_client command works just fine from the terminal.
Also, I tried to work with gdb on the rcdaq_server terminal while defining the random device and typing:
`rcdaq_client daq_begin 1
On the client terminal as before. This is the output I got on the server terminal:

[###]$ gdb rcdaq_server
GNU gdb (GDB) Fedora 8.3-6.fc30
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from rcdaq_server...
(gdb) r
Starting program: /###/softwarepo/install/bin/rcdaq_server 
warning: the debug information found in "/usr/lib/debug//lib64/ld-2.29.so.debug" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib64/ld-2.29.so.debug" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch).

Missing separate debuginfos, use: dnf debuginfo-install glibc-2.29-15.fc30.x86_64
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: the debug information found in "/usr/lib/debug//lib64/libpthread-2.29.so.debug" does not match "/lib64/libpthread.so.0" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib64/libpthread-2.29.so.debug" does not match "/lib64/libpthread.so.0" (CRC mismatch).

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
warning: the debug information found in "/usr/lib/debug//lib64/libdl-2.29.so.debug" does not match "/lib64/libdl.so.2" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib64/libdl-2.29.so.debug" does not match "/lib64/libdl.so.2" (CRC mismatch).

warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: the debug information found in "/usr/lib/debug//lib64/libm-2.29.so.debug" does not match "/lib64/libm.so.6" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib64/libm-2.29.so.debug" does not match "/lib64/libm.so.6" (CRC mismatch).

warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: the debug information found in "/usr/lib/debug//lib64/libc-2.29.so.debug" does not match "/lib64/libc.so.6" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib64/libc-2.29.so.debug" does not match "/lib64/libc.so.6" (CRC mismatch).

warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: Loadable section ".note.gnu.property" outside of ELF segments
warning: the debug information found in "/usr/lib/debug//lib64/libresolv-2.29.so.debug" does not match "/lib64/libresolv.so.2" (CRC mismatch).

warning: the debug information found in "/usr/lib/debug//usr/lib64/libresolv-2.29.so.debug" does not match "/lib64/libresolv.so.2" (CRC mismatch).

warning: Loadable section ".note.gnu.property" outside of ELF segments
[New Thread 0x7ffff347e700 (LWP 6829)]
write thread created
[New Thread 0x7ffff2c7d700 (LWP 6830)]
monitor thread created
[New Thread 0x7ffff247c700 (LWP 6831)]
monitor request thread created
Listening for monitoring requests on port 9930
[New Thread 0x7ffff1c7b700 (LWP 6832)]
event thread created
[New Thread 0x7ffff147a700 (LWP 6833)]
web service created
Server number is 0
Event id 1 size 44
[New Thread 0x7fffef277700 (LWP 6864)]
trigger loop created 

Thread 5 "rcdaq_server" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff1c7b700 (LWP 6832)]
0x0000000000000000 in ?? ()
Missing separate debuginfos, use: dnf debuginfo-install krb5-libs-1.17-14.fc30.x86_64 openssl-libs-1.1.1c-2.fc30.x86_64 pcre2-10.33-13.fc30.x86_64 zlib-1.2.11-17.fc30.x86_64
(gdb) Quit
(gdb)

It is worth mentioning that I installed the "debuginfo" etc. a few times with dnf install and I still get this message.

Thanks again for your help.

@mpurschke
Copy link
Contributor

Hmmm.. ok, Fedora is maybe not the most popular installation, but of course it should work. You stopped short of giving me the actual information I wanted, typing "where" in the gdb session after the segfault to get the exact line where it happens.

Before you retry, edit rcdaq's Makefile.am. Find the line where it sets the AM_LDFLAGS. Somewhere close, add a line

AM_CXXFLAGS += -g -O2

then go to your build area and type

make clean && make install

so we get meaningful debug info.

With the rcdaq_client not found - did you exactly follow my installation instructions in chapter 11? If you did, your $PATH should contain your $ONLINE_MAIN/bin area.

Let's get to the bottom of this with private mails for a while - [email protected] - those mails fill up quite a number of people's mailboxes when we do this here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants