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

Unexpected exception (non blocking for the web app) #604

Open
MdeLv opened this issue Oct 12, 2020 · 5 comments
Open

Unexpected exception (non blocking for the web app) #604

MdeLv opened this issue Oct 12, 2020 · 5 comments
Assignees

Comments

@MdeLv
Copy link
Contributor

MdeLv commented Oct 12, 2020

This is an old and non blocking exception.
The ocsigenserver console displays the following.
You can try to reproduce it by clicking on the manual link generated in the console when you add a new user (instead of using the account activation email). However, I was not able to reproduce it systematically.

You can read **Invalid_argument** Lwt.wakeup with a backtrace involving src/core/lwt.ml to stdlib.ml .
Is it a normally caught exception or is it something that needs to be fixed?
Thanks

ocsigenserver: ocsigen:access: connection for localhost from 127.0.0.1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): ?__na_eliom_actionkey=hjZx0d3BP8zNCdYv7cd2X6swqTo41d7e117a5f33682&__
eliom_na__name=action_link
ocsigenserver: ocsigen:access: connection for localhost from 127.0.0.1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0):                                                                    
ocsigenserver: ocsigen:access: connection for localhost from 127.0.0.1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/test81_8d39c30ac5496b20828e18af4b47c503.css                    
ocsigenserver: main: Unexpected exception in Server.wait_connection (handle connection): (Invalid_argument Lwt.wakeup)                                                                                            
ocsigenserver: main: backtrace:
ocsigenserver: main: Raised at file "stdlib.ml", line 30, characters 25-45
ocsigenserver: main: Called from file "ocsigen_http_com.ml", line 158, characters 2-33
ocsigenserver: main: Called from file "ocsigen_server.ml", line 836, characters 4-35
ocsigenserver: main: Called from file "src/core/lwt.ml", line 2048, characters 23-28
ocsigenserver: main:
ocsigenserver: ocsigen:access: connection for localhost from 127.0.0.1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/font-awesome.min.css                                           
ocsigenserver: ocsigen:access: connection for localhost from 127.0.0.1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_buttons.css                                                 
ocsigenserver: ocsigen:access: connection for localhost from 127.0.0.1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_carousel.css                                                
ocsigenserver: ocsigen:access: connection for localhost from 127.0.0.1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_sticky.css                                                  
ocsigenserver: ocsigen:access: connection for localhost from 127.0.0.1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_datetime.css                                                
ocsigenserver: ocsigen:main: While talking to 127.0.0.1:connection abruptly closed by peer (Unix.Unix_error(Unix.EPIPE, "write", ""))                                                                             
ocsigenserver: main: Unexpected exception in Server.wait_connection (handle connection): (Invalid_argument Lwt.wakeup)                                                                                            
ocsigenserver: main: backtrace:
ocsigenserver: main: Raised at file "stdlib.ml", line 30, characters 25-45
ocsigenserver: main: Called from file "ocsigen_http_com.ml", line 158, characters 2-33
ocsigenserver: main: Called from file "ocsigen_server.ml", line 836, characters 4-35
ocsigenserver: main: Called from file "src/core/lwt.ml", line 2048, characters 23-28
ocsigenserver: main:
ocsigenserver: main: Unexpected exception in Server.wait_connection (handle connection): (Invalid_argument Lwt.wakeup)                                                                                            
ocsigenserver: main: backtrace:
ocsigenserver: main: Raised at file "stdlib.ml", line 30, characters 25-45
ocsigenserver: main: Called from file "ocsigen_http_com.ml", line 158, characters 2-33
ocsigenserver: main: Called from file "ocsigen_server.ml", line 836, characters 4-35
ocsigenserver: main: Called from file "src/core/lwt.ml", line 2048, characters 23-28
ocsigenserver: main:
ocsigenserver: main: Unexpected exception in Server.wait_connection (handle connection): (Invalid_argument Lwt.wakeup)                                                                                            
ocsigenserver: main: backtrace:
ocsigenserver: main: Raised at file "stdlib.ml", line 30, characters 25-45
ocsigenserver: main: Called from file "ocsigen_http_com.ml", line 158, characters 2-33
ocsigenserver: main: Called from file "ocsigen_server.ml", line 836, characters 4-35
ocsigenserver: main: Called from file "src/core/lwt.ml", line 2048, characters 23-28
ocsigenserver: main:
ocsigenserver: main: Unexpected exception in Server.wait_connection (handle connection): (Invalid_argument Lwt.wakeup)                                                                                            
ocsigenserver: main: backtrace:
ocsigenserver: main: Raised at file "stdlib.ml", line 30, characters 25-45
ocsigenserver: main: Called from file "ocsigen_http_com.ml", line 158, characters 2-33
ocsigenserver: main: Called from file "ocsigen_server.ml", line 836, characters 4-35
ocsigenserver: main: Called from file "src/core/lwt.ml", line 2048, characters 23-28
ocsigenserver: main:
ocsigenserver: ocsigen:access: connection for localhost from 127.0.0.1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): __eliom_comet__                                                    

@MdeLv
Copy link
Contributor Author

MdeLv commented Oct 12, 2020

Here is another test I tried : duplicate a tab of your browser opened on an os web app (with user connected).
On one debian 10 machine, I got the same error as already described).
On another debian 10 machine, I got the following log (that may look like normal failwith behavior, considered from my OCaml knowledge)
Then, duplicating 2 or 3 more times any os tabs outputed normal log (and not the stlib.ml and src/core/lwt.ml exceptions).

ocsigenserver: ocsigen:main: Exn during page generation (sending 500): (Failure Netencoding.Url.dest_url_encoded_parameters)                                 
ocsigenserver: ocsigen:main: backtrace:
ocsigenserver: ocsigen:main: Raised at Stdlib.failwith in file "stdlib.ml", line 29, characters 17-33
ocsigenserver: ocsigen:main: Called from Netencoding.Url.dest_url_encoded_parameters.parse_after_amp in file "netencoding.ml", line 1085, characters 36-50   
ocsigenserver: ocsigen:main: Called from Netencoding.Url.dest_url_encoded_parameters.parse_after_amp in file "netencoding.ml", line 1087, characters 26-45   
ocsigenserver: ocsigen:main: Called from Netencoding.Url.dest_url_encoded_parameters.parse_after_amp in file "netencoding.ml", line 1087, characters 26-45   
ocsigenserver: ocsigen:main: Called from Netencoding.Url.dest_url_encoded_parameters.parse_after_amp in file "netencoding.ml", line 1085, characters 36-50   
ocsigenserver: ocsigen:main: Called from Netencoding.Url.dest_url_encoded_parameters.parse_after_amp in file "netencoding.ml", line 1085, characters 36-50   
ocsigenserver: ocsigen:main: Called from Netencoding.Url.dest_url_encoded_parameters.parse_after_amp in file "netencoding.ml", line 1087, characters 26-45   
ocsigenserver: ocsigen:main: Called from Netencoding.Url.dest_url_encoded_parameters.parse_after_amp in file "netencoding.ml", line 1085, characters 36-50   
ocsigenserver: ocsigen:main: Called from Ocsigen_server.find_post_params_form_urlencoded.(fun) in file "ocsigen_server.ml", line 129, characters 19-66       
ocsigenserver: ocsigen:main: Called from Lwt.Sequential_composition.catch in file "src/core/lwt.ml", line 2026, characters 16-20                             
ocsigenserver: ocsigen:main: Re-raised at Eliom_common.get_session_info.(fun) in file "src/lib/eliom_common.server.ml", line 915, characters 2-12524         
ocsigenserver: ocsigen:main:
ocsigenserver: ocsigen:main: While talking to 61.54.252.254:connection abruptly closed by peer
(...)

@MdeLv
Copy link
Contributor Author

MdeLv commented Oct 26, 2020

ocsigenserver.2.16.1
ocsigen-start.2.21.1

Pausing and restarting a server a few hours later, with a running web app, caused the same Unexpected exception as described before..
Is this information useful?

ocsigenserver: ocsigen:access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_icons.css
ocsigenserver: ocsigen:access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_picture_uploader.css
ocsigenserver: ocsigen:access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_popup.css
ocsigenserver: ocsigen:access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/font-awesome.min.css
ocsigenserver: ocsigen:access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_carousel.css
ocsigenserver: ocsigen:access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_sticky.css
ocsigenserver: ocsigen:access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_datetime.css
ocsigenserver: ocsigen:access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_drawer.css
ocsigenserver: ocsigen:access: connection for localhost from ::1 (Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0): css/ot_buttons.css
ocsigenserver: main: Unexpected exception in Server.wait_connection (handle connection): (Invalid_argument Lwt.wakeup)
ocsigenserver: main: backtrace:
ocsigenserver: main: Raised at file "stdlib.ml", line 30, characters 25-45
ocsigenserver: main: Called from file "ocsigen_http_com.ml", line 158, characters 2-33
ocsigenserver: main: Called from file "ocsigen_server.ml", line 836, characters 4-35
ocsigenserver: main: Called from file "src/core/lwt.ml", line 2048, characters 23-28
ocsigenserver: main: 

@MdeLv
Copy link
Contributor Author

MdeLv commented Nov 13, 2020

Is Unexpected exception in Server.wait_connection (handle connection): (Invalid_argument Lwt.wakeup) an issue? (even if it has no incidence on ocsigenserver).
Or is this a normal behavior?
Thanks.

@jrochel
Copy link

jrochel commented Nov 13, 2020

As far as I know this is considered normal behaviour for the moment. If I remember correctly it is a minor problem, yet relatively difficult fix. I'm sorry that I cannot give you more details. @vouillon?

@MdeLv
Copy link
Contributor Author

MdeLv commented Aug 2, 2023

ocsigen-start is supposed to use cohttp (since Jul 18, 2019 v 2.2.2 according to https://opam.ocaml.org/packages/ocsigen-start/ocsigen-start.2.0.1/ and https://opam.ocaml.org/packages/ocsigen-start/ocsigen-start.2.2.2/)

Is it correct ?
So we are talking about cohttp, isn't it ?

FYI, I saw the same error recently. I suspect that it may be caused by a desktop machine (for dev&test), that is suspended while ocsigen-start is executed, when resuming.
Do you think that it may be the cause? Can you reproduce that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants