[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] gnuradio on ARM: gr_vmcircbuf_sysv_shm: shmat (3): In
From: |
Monahan-Mitchell, Tim |
Subject: |
[Discuss-gnuradio] gnuradio on ARM: gr_vmcircbuf_sysv_shm: shmat (3): Invalid argument |
Date: |
Wed, 17 Apr 2013 23:28:23 +0000 |
gnuradio maint branch, v.3.6.4.1
'make test' fails, due to gr-core-test-all failing.
At first, I was getting an error due to the "shmat (2)" line above where this
error occurs, but it has settled on (3).
I added a couple lines of extra debug output (source code is below the error
output).
test 6
Start 6: gr-core-test-all
6: Test command: /bin/sh
"/src/gnuradio/build/gnuradio-core/src/tests/gr-core-test-all_test.sh"
6: Test timeout computed to be: 9.99988e+06
6: Testing gr_vmcircbuf_createfilemapping_factory...
6: gr_vmcircbuf_createfilemapping: createfilemapping is not available
6: ....... gr_vmcircbuf_createfilemapping_factory: Doesn't work
6: Testing gr_vmcircbuf_sysv_shm_factory...
6: gr_vmcircbuf_sysv_shm: shmat (3): Invalid argument
6: gr_vmcircbuf_sysv_shm: shmid1=163842, first_copy+pagesize=0x40039000
6: ....... gr_vmcircbuf_sysv_shm_factory: Doesn't work
6: Testing gr_vmcircbuf_mmap_shm_open_factory...
6: ....... gr_vmcircbuf_mmap_shm_open_factory: OK
6: Testing gr_vmcircbuf_mmap_tmpfile_factory...
6: ....... gr_vmcircbuf_mmap_tmpfile_factory: OK
6: ...........................NOTICE: test from c++ NOTICE
6: DEBUG: test from c++ DEBUG
6: INFO: test from c++ INFO
6: WARN: test from c++ WARN
6: ERROR: test from c++ ERROR
6: FATAL: test from c++ FATAL
6: .....Using Volk machine: generic
Snippet from gr_vmcircbuf_sysv_shm.cc :
// There may be a race between our detach and attach.
//
// If the system allocates all shared memory segments at the same
// virtual addresses in all processes and if the system allocates
// some other segment to first_copy or first_copoy + size between
// our detach and attach, the attaches below could fail [I've never
// seen it fail for this reason].
//shmdt (first_copy);
if (shmdt (first_copy) == -1){
perror("gr_vmcircbuf_sysv_shm: shmdt (a)"); // Debug line added
}
// first read-only guard page
if (shmat (shmid_guard, first_copy, SHM_RDONLY) == (void *) -1){
perror ("gr_vmcircbuf_sysv_shm: shmat (2)");
fprintf (stderr, "gr_vmcircbuf_sysv_shm: shmid_guard=%d,
first_copy=0x%x\n", shmid_guard, (unsigned int) first_copy);
shmctl (shmid_guard, IPC_RMID, 0);
shmctl (shmid1, IPC_RMID, 0);
throw std::runtime_error ("gr_vmcircbuf_sysv_shm");
}
// first copy
if (shmat (shmid1, (char *) first_copy + pagesize, 0) == (void *) -1){
perror ("gr_vmcircbuf_sysv_shm: shmat (3)");
fprintf (stderr, "gr_vmcircbuf_sysv_shm: shmid1=%d,
first_copy+pagesize=0x%x\n", shmid1, (unsigned int) ((char *) first_copy +
pagesize));
shmctl (shmid_guard, IPC_RMID, 0);
shmctl (shmid1, IPC_RMID, 0);
shmdt (first_copy);
throw std::runtime_error ("gr_vmcircbuf_sysv_shm");
}
On an earlier test run where the shmat (2) line failed, this was the debug
output from the above code:
6: Testing gr_vmcircbuf_sysv_shm_factory...
6: gr_vmcircbuf_sysv_shm: shmat (2): Invalid argument
6: gr_vmcircbuf_sysv_shm: shmid_guard=98304, first_copy=0x400e9000
Not sure how this will affect my system. Posting this more of an FYI.
I can add more details about the build if needed.
- [Discuss-gnuradio] gnuradio on ARM: gr_vmcircbuf_sysv_shm: shmat (3): Invalid argument,
Monahan-Mitchell, Tim <=