Bug 178285

Summary: webrtc/datachannel/basic-tcp.html will crash with an invalid crash
Product: WebKit Reporter: Matt Lewis <jlewis3>
Component: New BugsAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, commit-queue, dean_johnson, eric.carlson, jbedard, ryanhaddad, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Matt Lewis 2017-10-13 14:09:44 PDT
webrtc/datachannel/basic-tcp.html crashes on all platforms but does not have a valid crash log on Mac platforms.

History:
https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=webrtc%2Fdatachannel%2Fbasic-tcp.html

Example results:
https://build.webkit.org/results/Apple%20Sierra%20Release%20WK2%20(Tests)/r223296%20(5007)/results.html

error:
No crash log found for com.apple.WebKit.Networking.Development:423.

While not extremely flaky, this does cause the trees to go red occasionally.
Comment 1 Radar WebKit Bug Importer 2017-10-13 14:10:19 PDT
<rdar://problem/34985374>
Comment 2 Jonathan Bedard 2017-10-13 14:25:40 PDT
Here's the build: <https://build.webkit.org/builders/Apple%20Sierra%20Release%20WK2%20%28Tests%29/builds/5007>

Something strange if definitely going on.  I would expect us to pick up a crash-log from the networking process.  It's almost as if the networking process is being killed rather than crashing.
Comment 3 Alexey Proskuryakov 2017-10-13 15:58:40 PDT
This is somewhat reproducible, but hard to catch in a debugger:

run-webkit-tests webrtc/datachannel/basic-tcp.html --repeat 1000 --no-show --no-build --no-timeout -f

I may have caught this in debugger once, the Networking process died because of a SIGPIPE. The symptom matches, although this could be a user error.
Comment 4 Alexey Proskuryakov 2017-10-13 17:23:15 PDT
Definitely SIGPIPE, sent from the Networking process itself. It looks like libwebrtc tries to handle this signal in a couple places, but that's not quite working.

I couldn't get a good stack trace for where the signal is sent from, my probe prints unsymbolicated traces for some reason.

sudo dtrace -n 'proc:::signal-send /pid/ { printf("%d %s -%d %d",pid,execname,args[2],args[1]->pr_pid); ustack(); }'
Comment 5 Alexey Proskuryakov 2018-03-12 09:47:22 PDT
A reproducible crash in a test with "basic" in its name seems particularly worth looking into.
Comment 6 youenn fablet 2018-04-09 13:29:37 PDT
Created attachment 337534 [details]
Patch
Comment 7 WebKit Commit Bot 2018-04-10 14:13:20 PDT
Comment on attachment 337534 [details]
Patch

Clearing flags on attachment: 337534

Committed r230492: <https://trac.webkit.org/changeset/230492>
Comment 8 WebKit Commit Bot 2018-04-10 14:13:21 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 youenn fablet 2018-11-06 18:27:41 PST
Reopening to attach new patch.
Comment 10 youenn fablet 2018-11-06 18:27:45 PST
Created attachment 354042 [details]
Patch
Comment 11 WebKit Commit Bot 2018-11-07 17:34:41 PST
Comment on attachment 354042 [details]
Patch

Clearing flags on attachment: 354042

Committed r237970: <https://trac.webkit.org/changeset/237970>
Comment 12 WebKit Commit Bot 2018-11-07 17:34:42 PST
All reviewed patches have been landed.  Closing bug.