Closed benjumanji closed 8 years ago
Hm, weird - hard to see how that code can result in a segfault. Does it happen consistently?
Could you try pulling from master again and see if it still happens?
Regards, Gaute
Yes, completely consistently, with HEAD (v0.6-29-g3e892d3f). I know it's some imput in my mail that's provoking it, because when I had only imported a small amount of mail, it worked flawlessly. Is there any way to figure out what input it's choking on?
Benjamin Edwards writes on august 14, 2016 23:13:
Yes, completely consistently, with HEAD (v0.6-29-g3e892d3f). I know it's some imput in my mail that's provoking it, because when I had only imported a small amount of mail, it worked flawlessly. Is there any way to figure out what input it's choking on?
You could try running it in gdb, and see if the backtrace ('bt') gives more information than the core. Also, you could put the following debug code into src/utils/address.cc:
diff --git a/src/utils/address.cc b/src/utils/address.cc
index 9e0cfca..b406bdd 100644
--- a/src/utils/address.cc
+++ b/src/utils/address.cc
@@ -88,6 +88,8 @@ namespace Astroid {
}
ustring Address::fail_safe_name () {
+ log << debug << "getting fsafe name: " << _name << endl;
+
UstringUtils::trim (_name);
if (_name.length () == 0) {
return _email;
Sorry, I just saw that you already used gdb. If the debug info from address doesn't work, I'll put in debug messages in the trace of functions so thta it is possible to find the message-id/message-file.
Attached log. Spoiler: C0ngratuLations is the value that makes it puke. I guess it's probably not valid utf-8? Anyway.. the raw bytes:
f3 be 94 b0 20 43 30 6e 67 72 61 74 75 4c 61 74 69 6f 6e 73 20 f3 be 94 b0
Benjamin Edwards writes on august 16, 2016 0:37:
Attached log. Spoiler: C0ngratuLations is the value that makes it puke. I guess it's probably not valid utf-8? Anyway.. the raw bytes:
f3 be 94 b0 20 43 30 6e 67 72 61 74 75 4c 61 74 69 6f 6e 73 20 f3 be 94 b0
That looks like a spam email, would it be possible to send the actual email (gzipped or something) so that I could include it in the test-suite?
I am unsure if this is an astroid bug, the header is fetched through notmuch, which uses gmime if possible. What notmuch version do you have?
-gaute
Gaute Hope writes on august 16, 2016 8:39:
Benjamin Edwards writes on august 16, 2016 0:37:
Attached log. Spoiler: C0ngratuLations is the value that makes it puke. I guess it's probably not valid utf-8? Anyway.. the raw bytes:
f3 be 94 b0 20 43 30 6e 67 72 61 74 75 4c 61 74 69 6f 6e 73 20 f3 be 94 b0
That looks like a spam email, would it be possible to send the actual email (gzipped or something) so that I could include it in the test-suite?
I am unsure if this is an astroid bug, the header is fetched through notmuch, which uses gmime if possible. What notmuch version do you have?
-gaute
I am pretty sure the output is valid utf-8, python can handle it at least. I think it is the isspace test that doesn't handle it. Would be great with a complete test email.
Is there another patch you could offer that would make tracking down the path to the email easy?
Very happy to send the complete email.
On Tue, 16 Aug 2016, 08:26 Gaute Hope, notifications@github.com wrote:
Gaute Hope writes on august 16, 2016 8:39:
Benjamin Edwards writes on august 16, 2016 0:37:
Attached log. Spoiler: [image: [?]] C0ngratuLations [image: [?]] is the value that makes it puke. I guess it's probably not valid utf-8? Anyway.. the raw bytes:
f3 be 94 b0 20 43 30 6e 67 72 61 74 75 4c 61 74 69 6f 6e 73 20 f3 be 94 b0
That looks like a spam email, would it be possible to send the actual email (gzipped or something) so that I could include it in the test-suite?
I am unsure if this is an astroid bug, the header is fetched through notmuch, which uses gmime if possible. What notmuch version do you have?
-gaute
I am pretty sure the output is valid utf-8, python can handle it at least. I think it is the isspace test that doesn't handle it. Would be great with a complete test email.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/astroidmail/astroid/issues/194#issuecomment-240024236, or mute the thread https://github.com/notifications/unsubscribe-auth/AARufVb3w-pN5w4RHK2I70i-t94N0EYcks5qgWY9gaJpZM4Jj8H- .
Yes, but not super-easy, maybe you could just grep for the string?
By the way, your crash.txt log (while very useful!) does show all the authors of your emails, so you might want to delete it and not have it here publicly.
Ok, I was just being lazy. I'll have a root about for it when I am home from work.
I'll also delete that log, good point!
Ok! Sure :+1:
Voila!
Benjamin Edwards writes on august 16, 2016 20:46:
Voila!
Alright, please try latest master.
It worked! I can now open all my mail. Thanks for the quick turn around!
Benjamin Edwards writes on august 16, 2016 22:07:
It worked! I can now open all my mail. Thanks for the quick turn around!
Great!
the backtrace from gdb:
Maybe relevant?
Built from source. It dies on startup. Here is the log:
Then it dies with a SIGSEV.
Thoughts?