Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples/httpserver collapse #937

Closed
6643 opened this issue Jun 15, 2016 · 25 comments
Closed

examples/httpserver collapse #937

6643 opened this issue Jun 15, 2016 · 25 comments
Labels
triggers release Major issue that when fixed, results in an "emergency" release

Comments

@6643
Copy link

6643 commented Jun 15, 2016

if@mint ~/Documents/ponyc/examples/httpserver $ ./httpserver 
Listening on 127.0.0.1:50000
localhost - - [15/Jun/2016:10:28:23 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:23 +0000] "GET /favicon.ico HTTP/1.1" 200 26 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:29 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:29 +0000] "GET /favicon.ico HTTP/1.1" 200 26 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:29 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET /favicon.ico HTTP/1.1" 200 26 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET /favicon.ico HTTP/1.1" 200 26 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET /favicon.ico HTTP/1.1" 200 26 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET /favicon.ico HTTP/1.1" 200 26 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET /favicon.ico HTTP/1.1" 200 26 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET /favicon.ico HTTP/1.1" 200 26 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
localhost - - [15/Jun/2016:10:28:30 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36"
httpserver: src/libponyrt/gc/gc.c:360: mark_remote_object: Assertion `mutability != PONY_TRACE_MUTABLE' failed.
Aborted
@SeanTAllen
Copy link
Member

I haven't been able to reproduce this. Is this something you can easily reproduce?

@6643
Copy link
Author

6643 commented Jun 15, 2016

@SeanTAllen
has been in the press f5 to refresh the browser will appear

@SeanTAllen
Copy link
Member

what platform are you running on? if on linux, which distro?

what version of pony?

what version of llvm?

@6643
Copy link
Author

6643 commented Jun 15, 2016

@SeanTAllen

linuxmint18
0.2.1-946-ge992d20
llvm-3.6

@6643
Copy link
Author

6643 commented Jul 4, 2016

Remove logger no longer crashes

@SeanTAllen
Copy link
Member

Where you using VirtualBox?

Can you try again using the latest ponyc from masteR?

@6643
Copy link
Author

6643 commented Jul 8, 2016

linuxmint18

siege -c 100 -r 100 http://127.0.0.1:50000/

if@mint ~/Documents/ponyc/examples/httpserver $ ponyc -v
0.2.1-988-g4e0a773 [debug]

localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
localhost - - [08/Jul/2016:00:52:10 +0000] "GET / HTTP/1.1" 200 15 "" "Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/3.0.8"
Segmentation fault

@Theodus
Copy link
Contributor

Theodus commented Aug 1, 2016

I can confirm the Segmentation fault result on Linux Mint 18 with the latest version of ponyc (1e96984) and llvm 3.8.0. It should also be noted that I ran siege from a separate computer.

@Theodus
Copy link
Contributor

Theodus commented Aug 1, 2016

Running lldb gives this result:

Process 8925 stopped
* thread #6: tid = 8931, 0x0000000000428f43 httpserver`pony_traceunknown + 3, name = 'httpserver', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: 0x0000000000428f43 httpserver`pony_traceunknown + 3
httpserver`pony_traceunknown:
->  0x428f43 <+3>:  cmpq   $0x0, 0x40(%rax)
    0x428f48 <+8>:  je     0x428f50                  ; <+16>
    0x428f4a <+10>: jmpq   *0x18(%rdi)
    0x428f4d <+13>: nopl   (%rax)

@SeanTAllen
Copy link
Member

out of curiousity. @Theodus could you apply

WallarooLabs@4ead6e0

and run this again and see if the bug still exists. I assume it does, but... I'm wondering if it might fix. Mostly shot in the dark.

@Theodus
Copy link
Contributor

Theodus commented Aug 3, 2016

@SeanTAllen, it made no difference. It was worth a shot though.

@Perelandric
Copy link
Contributor

I get the same behavior, and using DiscardLog or removing logging altogether from the HTTP package makes no difference.

I'm on LinuxMint 17.3 with LLVM 3.6.

I did some digging, and was able to eliminate the seg fault by screwing around with the code in the received() method in _request_builder.pony. My edits wouldn't be correct code, but the nature of what does and does not eliminate the seg fault was interesting.

It's a little long to describe, so I put it into a gist. Hope it helps.

@IngoHohmann
Copy link

./httpserver
Listening on 127.0.0.1:50000
fume.fritz.box - - [08/Sep/2016:19:16:15 +0000] "GET /xxx HTTP/1.1" 200 18 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.92 Safari/537.36"
fume.fritz.box - - [08/Sep/2016:19:16:16 +0000] "GET /favicon.ico HTTP/1.1" 200 26 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.92 Safari/537.36"
fume.fritz.box - - [08/Sep/2016:19:16:22 +0000] "GET /xxx HTTP/1.1" 200 18 "" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.92 Safari/537.36"
fish: './httpserver' terminated by signal SIGSEGV (Adressbereichsfehler)

It happens consistently on the 3. get, on a 32 bit Linux machine

Distributor ID: ManjaroLinux
Release: 16.08
Codename: Ellada

ponyc --version
0.3.0 [release]

llvm-config --version
3.8.1

@SeanTAllen
Copy link
Member

Looking at this, I'm pretty sure this is the same bug as #1118. I can't imagine we have two bugs that result in crashes in trackunknown. @sylvanc would you agree?

@SeanTAllen SeanTAllen added bug: 1 - needs investigation triggers release Major issue that when fixed, results in an "emergency" release labels Oct 15, 2016
@SeanTAllen
Copy link
Member

@Theodus can you verify you still get this with the latest master and using llvm 3.8.1?

@Theodus
Copy link
Contributor

Theodus commented Oct 15, 2016

@SeanTAllen I get the same segfault.

0.5.0-8011ddf [release] (llvm 3.8.1) (cc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609)

@SeanTAllen
Copy link
Member

Thanks. Just wanted to verify @Theodus.

@SeanTAllen
Copy link
Member

We are assuming this is the same issue as #1118 and once that is fixed, will test this again to verify.

@Theodus
Copy link
Contributor

Theodus commented Nov 12, 2016

I have not been able to reproduce this with recent versions of Pony.

@SeanTAllen
Copy link
Member

interesting

@jemc
Copy link
Member

jemc commented Nov 12, 2016

Could it have been fixed by #1321 or #1405?

@Praetonus
Copy link
Member

@jemc That's very unlikely for #1321 and definitely not #1405.

@Perelandric
Copy link
Contributor

Commit f9591b2 seems to be the first commit that doesn't segfault.

@Praetonus
Copy link
Member

@Perelandric That's interesting. I guess there is a bug somewhere in the code generation for GC tracing. I'll look into it.

@SeanTAllen
Copy link
Member

I'm closing this because I think its fixed based on the above comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triggers release Major issue that when fixed, results in an "emergency" release
Projects
None yet
Development

No branches or pull requests

7 participants