After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782747 - Segmentation fault. strlen () at ../sysdeps/x86_64/strlen.S:106
Segmentation fault. strlen () at ../sysdeps/x86_64/strlen.S:106
Status: RESOLVED DUPLICATE of bug 773420
Product: evolution
Classification: Applications
Component: Composer
3.22.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2017-05-17 15:30 UTC by Christian Gogolin
Modified: 2017-05-22 09:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
backtrace of the crash (29.10 KB, text/plain)
2017-05-17 15:30 UTC, Christian Gogolin
Details

Description Christian Gogolin 2017-05-17 15:30:43 UTC
Created attachment 352035 [details]
backtrace of the crash

Evolution just crashed with the error message in the title while trying to send a email with an image attached. I recorded the attached backtrace. This might be related to 273386.
Comment 1 Christian Gogolin 2017-05-17 15:41:18 UTC
I should add that after re-opening Evolution I was asked whether I wanted to restore the email. Doing this I got the whole mail text back but no image was attached (this was the last thing I did before trying to send it, which resulted in the crash). I then attached the exact same image again and hit send and this time the email went out without any problems, so the bug is, unfortunately, not reproducible.
Comment 2 Milan Crha 2017-05-18 09:35:46 UTC
Thanks for a bug report. It's better to paste backtraces inline, or at least the crashing thread, thus it's significantly easier to search for them later. It's also recognized by bugzilla itself and it can eventually notify you about possible duplicates (I'm adding the crashing thread below).

Your crash looks pretty close to bug #773420, thus I'm marking this as a duplicate of it. That bug report is closed, due to lack of reproducer (which, unfortunately, happened here as well).

Thread 1 (Thread 0x7ffff7ee6000 (LWP 18700))

  • #0 strlen
    at ../sysdeps/x86_64/strlen.S line 106
  • #1 composer_build_message
  • #2 e_msg_composer_get_message_draft
    at e-msg-composer.c line 5218
  • #3 save_snapshot_replace_cb
    at e-autosave-utils.c line 331
  • #4 g_task_return_now
    at ././gio/gtask.c line 1121
  • #5 complete_in_idle_cb
    at ././gio/gtask.c line 1135
  • #6 g_main_dispatch
    at ././glib/gmain.c line 3203
  • #7 g_main_context_dispatch
    at ././glib/gmain.c line 3856
  • #8 g_main_context_iterate
    at ././glib/gmain.c line 3929
  • #9 g_main_loop_run
    at ././glib/gmain.c line 4125
  • #10 gtk_main
  • #11 main
    at main.c line 665

*** This bug has been marked as a duplicate of bug 773420 ***
Comment 3 Christian Gogolin 2017-05-19 10:38:23 UTC
Ok, thanks for the clarification about pasting backtraces.

It just happened again. This time while sending an email without any attachment after clicking on "Edit as new Message" of a previously sent email, then changing the recipient address and making a small change in the text of the email. The backtrace was:

Thread 1 "evolution" received signal SIGSEGV, Segmentation fault.
strlen () at ../sysdeps/x86_64/strlen.S:106
106	../sysdeps/x86_64/strlen.S: No such file or directory.
(gdb) backtrace 
  • #0 strlen
    at ../sysdeps/x86_64/strlen.S line 106
  • #1 composer_build_message
  • #2 e_msg_composer_get_message_draft
    at e-msg-composer.c line 5218
  • #3 save_snapshot_replace_cb
    at e-autosave-utils.c line 331
  • #4 g_task_return_now
    at ././gio/gtask.c line 1121
  • #5 complete_in_idle_cb
    at ././gio/gtask.c line 1135
  • #6 g_main_dispatch
    at ././glib/gmain.c line 3203
  • #7 g_main_context_dispatch
    at ././glib/gmain.c line 3856
  • #8 g_main_context_iterate
    at ././glib/gmain.c line 3929
  • #9 g_main_loop_run
    at ././glib/gmain.c line 4125
  • #10 gtk_main
  • #11 main
    at main.c line 665

Just before the crash I noticed that sending took unusually long to complete and in top I could see some Webkit process taking up 100% of CPU for an extended amount of time. Then the crash happened and after restarting Evolution and recovering the email, the body of the email was empty. Repeating the same steps made the email go out normally.

While I cannot deterministically reproduce this, it seems likely that it will happen again in the future. Can you tell me what additional information I can provide the next time the crash happens that would help you resolve the issue?
Comment 4 Milan Crha 2017-05-19 11:32:57 UTC
(In reply to Christian Gogolin from comment #3)
> Just before the crash I noticed that sending took unusually long to complete
> and in top I could see some Webkit process taking up 100% of CPU for an
> extended amount of time. Then the crash happened and after restarting
> Evolution and recovering the email, the body of the email was empty.

That's it, the WebKitWebProcess got stuck on something, then the call to retrieve message body timed out due to it, and it resulted into the crash. The fix in the other bug doesn't cause the crash, but also lefts message body as empty.

If you could, and I do not know whether there will be enough time for it, then capture backtrace of that stuck (high-CPU-using) WebKitWebProcess, which will show what it does. I see you have already installed debuginfo for evolution, which should be sufficient (debuginfo for WebKitGTK+ is huge and usually not needed, thus please avoid it for now; it can also break gdb bakctrace capturing in some situations).

By the way, are all your messages HTML? With or without inline images? Any signatures also in HTML? With or without inline images? This seems to be data-specific and very sensitive on the data itself. I recall that spellchecker could get crazy sometimes, also blocking the web process, but it wasn't a busy-loop block, if I recall correctly.

Some version of WebKit could also get stuck in hyphenation. If it is the thing you face or not I do not know. it's filled here:
https://bugs.webkit.org/show_bug.cgi?id=165601

What it is will show the backtrace of the WebKitWebProcess.
Comment 5 Christian Gogolin 2017-05-19 13:17:30 UTC
Great looks like there is a chance to nail this one down.

I have hacked together the following bash script 

#!/bin/bash                                                                                                                                                                           

load=0
i=0
threshold=90.0
dt=0.1
num=5
while true
do
    sleep $dt
    ret=$(ps -eo pid -eo pcpu -eo command | grep WebKitWebProcess | sort -k 2 -r | head -n 1 | awk '{print $1, $2}')
    pid=$(echo $ret | awk '{print $1}')
    load=$(echo $ret | awk '{print $2}')
    echo "$pid causes $load"
    st=`echo "$load > $threshold" | bc`
    if [ $st -eq 1 ]
    then
        i=$i+1  
        echo "load high $i"
    else
        i=0
        echo "load low"
    fi
      
    if [[ $i -gt $num ]]
    then
        gdb -p "$pid" -ex cont
    fi
done


that monitors the resource usage of WebKitWebProcesses and launches attaches gdb if the exceed 90% load for more than a second and immediately continues execution. I will be running this on the side and hope that it triggers at some point.

I suppose that Evolution kills the process after the timeout and that then gdb will ask me for input? What shall I do than? Is a simple "backtrace" enough for you?

Both messages for which I observed the problem were HTML without inline images and plain text signatures. The first had an image attached.
Comment 6 Milan Crha 2017-05-22 09:35:47 UTC
Okay. First of all, why did you reopen the bug report? Please do not do that, I do read comments on closed bugs too, as you might notice earlier. You just caused unnecessary noise and mess due to the reopen. I will reopen this, if it will be needed (but I'll rather reference the older bug in any follow-up changes). We can do further investigation here, I'm all fine with it.

(In reply to Christian Gogolin from comment #5)
> I suppose that Evolution kills the process after the timeout and that then
> gdb will ask me for input?

I do not know, I do not think evolution kills anything on purpose, the WebKitWebProcess is fully handled by WebKitGTK+ without any direct evolution intervention.

> What shall I do than?

Waiting for the process to be stopped is too late. I need backtrace when the process is stuck, not when it's stopped. A backtrace of all threads would be fine as the started, like "t a a bt" command in gdb.

Ideally, when you notice higher CPU usage and evolution looking like being stuck on something, then that's the time when capture the backtrace of the corresponding WebKitWebProcess. The thing is there are always at least two such processes. One for message preview(s), another for message composer(s). The one for composers automatically goes away when all composers are closed and is created when the first composer window is opened (it's shared between all composer instances).

*** This bug has been marked as a duplicate of bug 773420 ***