Bug 1473596
Summary: | lvmetad crashes with “memory smash” during lvm parallel operations | ||||||
---|---|---|---|---|---|---|---|
Product: | [Community] LVM and device-mapper | Reporter: | Gururaj <gururaj.srk> | ||||
Component: | lvm2 | Assignee: | Zdenek Kabelac <zkabelac> | ||||
lvm2 sub component: | lvmetad | QA Contact: | cluster-qe <cluster-qe> | ||||
Status: | POST --- | Docs Contact: | |||||
Severity: | unspecified | ||||||
Priority: | unspecified | CC: | agk, gururaj.srk, heinzm, jbrassow, msnitzer, prajnoha, zkabelac | ||||
Version: | 2.02.173 | Flags: | rule-engine:
lvm-technical-solution?
rule-engine: lvm-test-coverage? |
||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | mips64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | Type: | Bug | |||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Gururaj
2017-07-21 09:18:20 UTC
Please don't use --enable-debug It's designed for internal use - not for regular usage. Internal debugging has it's known limitation with thread usage. Hi, Thank you for quick response. The debug is used only once we discovered this issue.So, this is reproducible without debug "--enable-debug" option also. With Regards, Gururaj S Hi, Thank you for quick response. The debug is used only once we discovered this issue.So, this is reproducible without debug "--enable-debug" option also. With Regards, Gururaj S Can you please attach backtrace of your crash for normal build of lvmetad ? Also as a simple workaround - disable use_lvmetad in your lvm.conf It's probably the best you can do ATM. Hi, We are not able to reproduce this on LVM-2.02.173 package without --enable-debug. Anyway, just from the code point of view, we can have a lock introduced to this data structure. struct memblock { struct memblock *prev, *next; /* All allocated blocks are linked */ size_t length; /* Size of the requested block */ int id; /* Index of the block */ const char *file; /* File that allocated */ int line; /* Line that allocated */ void *magic; /* Address of this block */ } __attribute__((aligned(8))); static struct memblock *_head = 0; static struct memblock *_tail = 0; Please provide your suggestion. With Regards, Gururaj S lvm2 developers are well aware of limitation of internal debugging code - which has been developed in previous millennium. The original purpose was to track memory usage from non-pthreaded programs. However then some 'threaded' tools/daemons were written. The reason why this code is no longer extended/developed is - there are simply way better tools available these days (be it valgrind, clang memory sanitizer...). But you are possibly right we may add more support for people who tend to use internal debugging support outside of lvm2 team - so it can be worth to make it more pthread aware. Was this build actually compiling lvmetad but WITHOUT 'dmeventd' ? (--enabled-dmeventd was not passed on configure) There is actually a bug in Makefile passing 'DEBUG_MEM' when pthreaded program is compiled - which normally should be ONLY used for non-multithreaded programs. Hi, Good to know this. I think it is good to idea have documentation on this. If it is available then great. Anyhow, we can close this thread if you do not have any further discussion on this With Regards, Gururaj S Assuming this was addressed by commits: https://www.redhat.com/archives/lvm-devel/2017-August/msg00006.html https://www.redhat.com/archives/lvm-devel/2017-August/msg00010.html https://www.redhat.com/archives/lvm-devel/2017-August/msg00009.html to avoid compilation of oldish thread unsafe memory debugging code when pthread code is compiled-in. |