View Issue Details

IDProjectCategoryView StatusLast Update
0005582GNUnetnamestore servicepublic2020-08-14 10:04
Reporterschanzen Assigned Toschanzen Due Date
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionreopened 
OSmacOS 
Product VersionGit master 
Target Version0.11.0 
Summary0005582: namestore tests fail on macOS
DescriptionThe namestore tests, in particular those related to the sqlite plugin, fail with a segfault.
The segfault occurs _after_ the main of the test returns, which indicates a stack corruption.
Unfortunately, for macOS 10.14 there is no valgrind yet and I had to luck with gdb until now.
TagsNo tags attached.

Activities

schanzen

2019-02-17 14:03

administrator   ~0013842

My lldb output:

(lldb) run
Process 60864 launched: '.libs/test_plugin_namestore_sqlite' (x86_64)
Process 60864 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10042e637)
    frame #0: 0x000000010042e637
error: memory read failed for 0x10042e600
Target 0: (test_plugin_namestore_sqlite) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10042e637)
  * frame #0: 0x000000010042e637
    frame #1: 0x0000000100086938 dyld`initialPool + 40
    frame #2: 0x0000000100086938 dyld`initialPool + 40
    frame #3: 0x000000010001cff3 dyld`ImageLoaderMachO::doTermination(ImageLoader::LinkContext const&) + 251
    frame #4: 0x0000000100006824 dyld`dyld::runAllStaticTerminators(void*) + 68
    frame #5: 0x00007fff61395ef2 libsystem_c.dylib`__cxa_finalize_ranges + 351
    frame #6: 0x00007fff613961de libsystem_c.dylib`exit + 55
    frame #7: 0x00007fff612ecee0 libdyld.dylib`start + 8

schanzen

2019-02-17 15:28

administrator   ~0013843

Commenting line 191 (get_record). Makes the test pass without corruption.
The tests is kind of strange anyway... maybe it needs to be rewritten...

schanzen

2019-02-17 15:37

administrator   ~0013845

To be honest I find this test rather odd to begin with. I mean, what are we testing here exactly? The service loads and uses the plugin differently and we shouldn't really duplicate that code in the test and instead... test it.
And this is what we do in the rest of the tests. So I think before fixing this mess we should replace it with something simpler or drop it.

schanzen

2019-02-23 12:08

administrator   ~0013959

Added this as target for 0.11.1 for now.

schanzen

2019-10-11 16:37

administrator   ~0015001

This is still a valid issue

schanzen

2019-10-11 16:40

administrator   ~0015002

For now ifdef'd test for macos to make it work.

Christian Grothoff

2019-10-11 18:50

manager   ~0015003

I don't understand what you think is wrong about the test. It has to load the plugin before using it (especially given that its written independent of the specific plugin under test), and then unloads it (which tests plugin unloading). Looks logical to me.

schanzen

2019-10-11 19:36

administrator   ~0015004

There is nothing wrong with the test. But for some reason the unload segfaults on macOS. This is an issue we already talked about. I cannot track it down. The bug is not in our code (presumably).
The plugin also "works" w/o segfault in the actual service.

schanzen

2020-02-10 22:56

administrator   ~0015342

Test mitigation is implemented for a long time now

schanzen

2020-08-14 10:04

administrator   ~0016624

Closing as resolved since at least 0.13.2

Issue History

Date ModifiedUsernameFieldChange
2019-02-16 22:56schanzenNew Issue
2019-02-17 14:03schanzenNote Added: 0013842
2019-02-17 15:28schanzenNote Added: 0013843
2019-02-17 15:37schanzenNote Added: 0013845
2019-02-17 19:28schanzenStatusnew => feedback
2019-02-23 12:07schanzenProduct Version => Git master
2019-02-23 12:07schanzenTarget Version => 0.11.1
2019-02-23 12:08schanzenNote Added: 0013959
2019-02-23 12:08schanzenStatusfeedback => new
2019-02-23 12:12schanzenAssigned To => schanzen
2019-02-23 12:12schanzenStatusnew => assigned
2019-02-23 12:17schanzenStatusassigned => resolved
2019-02-23 12:17schanzenResolutionopen => fixed
2019-02-23 12:17schanzenFixed in Version => 0.11.0
2019-02-28 09:51Christian GrothoffTarget Version0.11.1 => 0.11.0
2019-02-28 10:17Christian GrothoffStatusresolved => closed
2019-10-11 16:37schanzenStatusclosed => feedback
2019-10-11 16:37schanzenResolutionfixed => reopened
2019-10-11 16:37schanzenNote Added: 0015001
2019-10-11 16:40schanzenNote Added: 0015002
2019-10-11 16:40schanzenFixed in Version0.11.0 =>
2019-10-11 18:50Christian GrothoffNote Added: 0015003
2019-10-11 19:36schanzenNote Added: 0015004
2019-10-11 19:36schanzenOS => macOS
2019-11-08 10:25schanzenStatusfeedback => assigned
2020-02-10 22:56schanzenStatusassigned => resolved
2020-02-10 22:56schanzenFixed in Version => 0.12.3
2020-02-10 22:56schanzenNote Added: 0015342
2020-08-14 10:04schanzenNote Added: 0016624
2020-08-14 10:04schanzenStatusresolved => closed