Bug 1177363
| Summary: | [abrt] tar killed by SIGSEGV (segfault in malloc) | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Rick <rracicot> | ||||||||||||||||||||||||
| Component: | tar | Assignee: | Pavel Raiskup <praiskup> | ||||||||||||||||||||||||
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||||||||||||||||
| Priority: | unspecified | ||||||||||||||||||||||||||
| Version: | 20 | CC: | arjun, codonell, jakub, kdudka, law, ovasik, pfrankli, praiskup, spoyarek | ||||||||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||||||||||
| Target Release: | --- | ||||||||||||||||||||||||||
| Hardware: | x86_64 | ||||||||||||||||||||||||||
| OS: | Unspecified | ||||||||||||||||||||||||||
| URL: | https://retrace.fedoraproject.org/faf/reports/bthash/dc7ffb8aacba989aa62877bd36723633ac267658 | ||||||||||||||||||||||||||
| Whiteboard: | abrt_hash:24a603326cd0381789105739d0d584567757dff1 | ||||||||||||||||||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||||||||||
| Last Closed: | 2014-12-29 15:01:20 UTC | Type: | --- | ||||||||||||||||||||||||
| 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
Rick
2014-12-26 17:32:35 UTC
Created attachment 973225 [details]
File: backtrace
Created attachment 973226 [details]
File: cgroup
Created attachment 973237 [details]
File: core_backtrace
Created attachment 973238 [details]
File: dso_list
Created attachment 973239 [details]
File: environ
Created attachment 973240 [details]
File: exploitable
Created attachment 973241 [details]
File: limits
Created attachment 973242 [details]
File: maps
Created attachment 973243 [details]
File: open_fds
Created attachment 973244 [details]
File: proc_pid_status
Created attachment 973245 [details]
File: var_log_messages
Hmmmms, based on the backtrace it looks like "/proc/self/task/18425/fd/4/proc/self/task/18425..." are cross symlinks - causing infinite filename value(which later causes xstrdup failure). Assigning to Pavel - as he is probably aware whether this was already fixed or not in rawhide/f21. Yes, the problem causing this segfault is duplicate of (not yet fixed) bug 1115890. However, I'm not sure whether glibc's malloc should ever SEGFAULT, this should rather end up with 'memory exhausted' tar's error after not successfull xmalloc(). Re-assigning against glibc. Oh, no, sorry - it was just bad luck stack overflow happened in malloc. *** This bug has been marked as a duplicate of bug 1115890 *** (In reply to Pavel Raiskup from comment #13) > Yes, the problem causing this segfault is duplicate of (not yet fixed) bug > 1115890. However, I'm not sure whether glibc's malloc should ever SEGFAULT, > this should rather end up with 'memory exhausted' tar's error after not > successfull xmalloc(). > > Re-assigning against glibc. I know the bug is closed and it has been acknowledged to be a stack overflow in tar, but I wanted to comment briefly on the question of "Should malloc ever SEGFAULT?" The answer to that question is "Yes it might SEGFAULT and we can't guarantee, and don't want to guarantee, that it never SEGFAULT." The reason is that corruption of the block accounting data is possible in such a way that would cause malloc to crash. Preventing such a crash would have steep performance costs that an average-case allocator should not need to pay. Anything that might cause undefined behaviour in your program, for example a stack overflow, can cause any core glibc function to do anything, including crash. We're looking at adding an "ultra safe" allocator in glibc to use as a fallback while the application is shutting down from a detected corruption, which should make it easier to shutdown gracefully from abort, but it won't help you unless you can detect the problem. Unfortunately failure detection is often 9/10th of the problem. Hopefully that answers your question. |