Summary: | memcheck causes segfault on a dynamically-linked test from rustlang's test suite on i686 | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | infinity0 |
Component: | memcheck | Assignee: | Julian Seward <jseward> |
Status: | REPORTED --- | ||
Severity: | crash | CC: | philippe.waroquiers, tom |
Priority: | NOR | ||
Version First Reported In: | 3.11.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
infinity0
2016-02-23 14:55:16 UTC
Hasn't it told you exactly what cause the fault? You ran out of stack space... We don't think that's the real reason. I don't know how to analyse such things but another Debian maintainer looked through the proc-mem map that I linked above, and had this to say: 15:48:15 <kaeso> infinity0: it seems to me it still has some space to grow the stack in slot 26, even though I don't understand why it's trying to do it there 15:49:41 <kaeso> infinity0: I think valgrind is getting to confuse the same way and won't let the stack grow there What you're missing is that valgrind imposes it's own limit of 8Mb on the stack, which you have clearly hit given the size it reported. Just looking at the memory map won't help you. At least I thought it did, because I remember it being discussed recently, bit I can't find it right now... Well, I had already tried setting --main-stacksize (as the error message suggests) very high all the way until other tests started failing because the "stack was too big", and the segfault issue persisted. I know that this flag doesn't change the stack size of new threads, however I read somewhere else that the latter is outside of valgrind's control so that's why there is no such flag - but then this also implies that shouldn't be the cause of this issue. (Or is this wrong? I'm just repeating what I remember reading, I don't really understand valgrind.) Does your theory explain why everything's OK on amd64, and is also OK on i686 when we statically link the test executable (the current "fix" commited to rust)? Seeing the first 2 lines of output: ==6449== Can't extend stack to 0x4bb9880 during signal delivery for thread 2: ==6449== no stack segment it might be worth trying with --vex-iropt-register-updates=allregs-at-each-insn just in case your test case does special things with signals. (In reply to infinity0 from comment #5) Greetings, Rustacean::infinity0. Is this bug still a problem for the Rust devs? If yes, are there up to date STRs? On the whole I am unhappy when Valgrind fails, for unclear reasons, to run a program that works natively. So if there's an easy fix, it would be nice to find it. |