> > ...
> > segfault at 0000000000000000 rip 0000000000412d2c rsp 00007fffa08b5b70
> error 4
> > segfault at 0000000000000000 rip 0000000000412d2c rsp 00007fff78944c00
> error 4
> > segfault at 0000000000000000 rip 0000000000412d2c rsp 00007fffc0bf9eb0
> error 4
>
> If this is at all repeatable, then it would be great if you can run it under
> 'gdb' and get a stack trace.
It repeats just fine, I just haven't managed to trigger it manually :(
Might just be this, though (abridged):
---
from: Dan Williams <[EMAIL PROTECTED]>
to: [EMAIL PROTECTED],
date Fri, Apr 4, 2008 at 6:01 PM
subject Re: segfault in mdadm v2.6.4
There is a known issue with arrays in the "read-auto" state and "mdadm
--monitor". The attached patch addresses this.
---
I have attached said patch, maybe it should be included in the Debian package?
Cheers,
C.
mdadm: fix segfault, /proc/mdstat parsing of 'level'
From: Dan Williams <[EMAIL PROTECTED]>
If the array is in 'read-auto' mode /proc/mdstat will have a string
like:
"active(auto-read-only)"
The parsing code does not recognize this as "active" so it does not set
->level. This leads to a segfault in --monitor mode (Monitor.c:405).
Signed-off-by: Dan Williams <[EMAIL PROTECTED]>
---
mdstat.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/mdstat.c b/mdstat.c
index 335e1e5..1dcd709 100644
--- a/mdstat.c
+++ b/mdstat.c
@@ -165,7 +165,8 @@ struct mdstat_ent *mdstat_read(int hold, int start)
for (w=dl_next(line); w!= line ; w=dl_next(w)) {
int l = strlen(w);
char *eq;
- if (strcmp(w, "active")==0)
+ if (strncmp(w, "active", strlen("active"))==0)
+ /* strncmp to catch the "active(auto-read-only)" case */
ent->active = 1;
else if (strcmp(w, "inactive")==0)
ent->active = 0;