Re: [elinks-dev] Crash when download ends (Crashes again !)
This time, the crash happened with the following scenario: 1. in tty4, I run elinks and browsed to freshmeat.net 2. in tty6, I ran elinks and went to download latest 0.13 snapshot of elinks. 3. After the download started, I closed the elinks in tty6. Immediately the elinks in tty4 crashes (before the download finishes) giving me the following error: Link: INTERNAL ERROR at /tmp/buildd/elinks-0.13~20080928/src/main/select.c:149: assertion fd = 0 fd FD_SETSIZE failed: set_handlers: handle -1 = FD_SETSIZE 1024 Forcing core dump! Man the Lifeboats! Women and children first! But please DO NOT report this as a segfault!!! It is an internal error, not a normal segfault, there is a huge difference in these for us the developers. Also, noting the EXACT error you got above is crucial for hunting the problem down. Thanks, and please get in touch with us. ELinks crashed. That shouldn't happen. Please report this incident to the developers. If you would like to help to debug the problem you just uncovered, please keep the core you just got and send the developers the output of 'bt' command entered inside of gdb (which you run as: gdb elinks core). Thanks a lot for your cooperation! ELinks 0.13.GIT Built on Sep 30 2008 08:19:57 Features: Debug, IPv6, gzip, bzip2, UTF-8, Periodic Saving, Viewer (Search History, Timer, Marks), Cascading Style Sheets, Protocol (Authentication, BitTorrent, File, CGI, Finger, FSP, FTP, Gopher, HTTP, NNTP, SMB, URI rewrite, User protocols), SSL (GnuTLS), MIME (Option system, Mailcap, Mimetypes files), LED indicators, Bookmarks, Cookies, ECMAScript (SpiderMonkey), Form History, Global History, Scripting (Lua, Guile, Perl, Python, Ruby, Spidermonkey ECMAScript), Exmode, Goto URL History elinks(dump_backtrace+0x1c)[0x8132bcc] elinks[0x80e302d] elinks[0x80e2f34] [0xb7fc8420] elinks(force_dump+0x69)[0x8133019] elinks(elinks_internal+0x74)[0x8133134] elinks(set_handlers+0xec)[0x80d63dc] elinks[0x8108027] elinks[0x8108471] elinks[0x80df8fd] elinks(select_loop+0x23b)[0x80d693b] elinks(main+0x4a)[0x80d5e1a] /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7b54450] elinks[0x80629e1] Aborted -- أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer SySDSoft, Inc. GPG KeyID: 0x9DCA0B27 (@ subkeys.pgp.net) GPG Fingerprint: 087D 3767 8CAC 65B1 8F6C 156E D325 C3C8 9DCA 0B27 ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] Crash when download ends (Crashes again !)
أحمد المحمودي [EMAIL PROTECTED] writes: This time, the crash happened with the following scenario: 1. in tty4, I run elinks and browsed to freshmeat.net 2. in tty6, I ran elinks and went to download latest 0.13 snapshot of elinks. 3. After the download started, I closed the elinks in tty6. Immediately the elinks in tty4 crashes (before the download finishes) giving me the following error: Link: INTERNAL ERROR at /tmp/buildd/elinks-0.13~20080928/src/main/select.c:149: assertion fd = 0 fd FD_SETSIZE failed: set_handlers: handle -1 = FD_SETSIZE 1024 I got the following from valgrind. I'm not sure whether it was before or after the assertion failure. ==14702==at 0x80DD791: read_from_socket (socket.c:945) ==14702==by 0x8104D0C: read_more_http_data (http.c:1180) ==14702==by 0x81052FE: read_http_data (http.c:1388) ==14702==by 0x80DD69B: read_select (socket.c:910) ==14702==by 0x80D27AA: select_loop (select.c:307) ==14702==by 0x80D1ADE: main (main.c:358) ==14702== Address 0x4F4E598 is 56 bytes inside a block of size 81 free'd ==14702==at 0x402210F: free (vg_replace_malloc.c:233) ==14702==by 0x812BED8: debug_mem_free (memdebug.c:484) ==14702==by 0x80D7C82: done_connection (connection.c:479) ==14702==by 0x80D8A44: abort_connection (connection.c:769) ==14702==by 0x80D99CE: cancel_download (connection.c:1053) ==14702==by 0x8110EB6: abort_download (download.c:143) ==14702==by 0x81115BC: download_data_store (download.c:337) ==14702==by 0x8111AFB: download_data (download.c:446) ==14702==by 0x80D7B33: notify_connection_callbacks (connection.c:458) ==14702==by 0x80D781E: set_connection_state (connection.c:388) ==14702==by 0x80D7132: set_connection_socket_state (connection.c:234) ==14702==by 0x80DD78D: read_from_socket (socket.c:943) Apparently, abort_connection() has closed the sockets of the connection, and done_connection() has then freed the connection and its sockets, but read_from_socket() does not know about that and tries to set up a read handler for the socket again. Because the socket has been freed, it is not even safe to check whether socket-fd is -1. pgptFV5d6XnQl.pgp Description: PGP signature ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] Crash when download ends
Hello, On Sun, Sep 28, 2008 at 05:36:28PM +0200, أحمد المحمودي wrote: Hello, ELinks 0.13 (20080915 snapshot) crashes when a download finishes, that is in the case that this download was started from a window that is closed before the download finishes. ---end quoted text--- I just tested with today's snapshot (20080928), and the bug is still there. -- أحمد المحمودي (Ahmed El-Mahmoudy) Digital design engineer SySDSoft, Inc. GPG KeyID: 0x9DCA0B27 (@ subkeys.pgp.net) GPG Fingerprint: 087D 3767 8CAC 65B1 8F6C 156E D325 C3C8 9DCA 0B27 ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] Crash when download ends
Kalle Olavi Niemitalo [EMAIL PROTECTED] writes: I guess we should make destroy_terminal() search for download.term pointers to that terminal, and reset them to NULL. struct download is used in these structures: I wasn't thinking straight. The pointer is file_download.term, not download.term. So it does not matter if struct download is used in other places. destroy_session() calls destroy_downloads(), which detaches file downloads from the session that is being destroyed and tries to attach them to some other session on the same terminal. Possibly we could make destroy_session() also set file_download.term = NULL if no other session remains on the terminal. Then, destroy_terminal() might not have to explicitly detach file downloads from the terminal, because it already destroys all tab windows and their sessions on the terminal. However, that won't work if it is possible to keep ELinks running on a terminal that does not have any tab windows in it, and even add file downloads to that terminal, e.g. by selecting them from the download manager and telling ELinks to report on that terminal when they complete. Perhaps it is not possible now but I don't want to leave such a trap in the source code. So, I think it would be better to have destroy_terminal() detach file downloads from the terminal, rather than rely on destroy_session(). I don't understand why the file_download.ses pointer exists at all. It seems to be used only for check_questions_queue(file_download-ses) in abort_download(). But why does check_questions_queue() even take a session parameter; shouldn't the terminal be used instead? Of the functions given to add_questions_entry(), only do_auth_dialog() and http_error_document() really use the session parameter rather than just the terminal. They seem to assume that the session is the one where the authentication is needed or the HTTP error occurred, but as far as I can tell, these assumptions do not always hold. pgpUdESS1mBzt.pgp Description: PGP signature ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev