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

LVM segfault issue #62

Closed
cholcombe973 opened this issue Mar 5, 2019 · 3 comments
Closed

LVM segfault issue #62

cholcombe973 opened this issue Mar 5, 2019 · 3 comments
Assignees

Comments

@cholcombe973
Copy link
Collaborator

With enough threads it seems that LVM init segfaults for some unknown reason.
```00:16:10 [DEBUG] postgres: preparing query with name ``: UPDATE hardware SET state = 'unscanned' WHERE device_id=2
00:16:10 [DEBUG] postgres: executing query: COMMIT
00:16:10 [DEBUG] bynar::test_disk: thread 2993564 Transition failed. Trying next transition
00:16:10 [DEBUG] lvm: dropping lvm

Thread 28 "bynar" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe33f9700 (LWP 2993637)]
0x00007ffff7683607 in dm_pool_alloc_aligned () from /lib/x86_64-linux-gnu/libdevmapper.so.1.02.1
(gdb) bt
#0 0x00007ffff7683607 in dm_pool_alloc_aligned () from /lib/x86_64-linux-gnu/libdevmapper.so.1.02.1
#1 0x00007ffff7683a5e in dm_pool_zalloc () from /lib/x86_64-linux-gnu/libdevmapper.so.1.02.1
#2 0x00007ffff78cef48 in ?? () from /lib/x86_64-linux-gnu/liblvm2app.so.2.2
#3 0x00007ffff78c3cae in ?? () from /lib/x86_64-linux-gnu/liblvm2app.so.2.2
#4 0x00007ffff78c755e in ?? () from /lib/x86_64-linux-gnu/liblvm2app.so.2.2
#5 0x00007ffff78b46a0 in lvm_init () from /lib/x86_64-linux-gnu/liblvm2app.so.2.2
#6 0x0000555556284acc in lvm::Lvm::new::h70e76aef47c8d063 (system_dir=Option<&str>) at lvm/src/lib.rs:450
#7 0x0000555555c2a5b0 in bynar::test_disk::is_disk_blank::h6e8f871b18876247 (dev=0x7fff74001320) at src/test_disk.rs:1586
#8 0x0000555555c19802 in _$LT$bynar..test_disk..Eval$u20$as$u20$bynar..test_disk..Transition$GT$::transition::h985d5930d2e53f8b (
to_state=Good, device=0x7fffe33f2d48, _scsi_info=0x7fffe33f2ed8, _simulate=false) at src/test_disk.rs:449

@cholcombe973 cholcombe973 self-assigned this Mar 5, 2019
@cholcombe973
Copy link
Collaborator Author

A workaround has been implemented in #63

@sdandam
Copy link
Collaborator

sdandam commented Mar 11, 2019

This seems to be an issue with the DB transaction failing with multiple-threads?

@cholcombe973
Copy link
Collaborator Author

cholcombe973 commented Mar 11, 2019

https://bugzilla.redhat.com/show_bug.cgi?id=851287 It looks like this was never meant to be used in a multithreaded context. There's a few possible workarounds for this:

  1. Wrap the LVM struct in an Arc
  2. Do one global lvm list and pass that to the state machines
  3. ??

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