Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
'mc' stuck after sftp password entered and about to open the dir
$ sudo gdb -p 19432
[sudo] password for user: 
GNU gdb (GDB) 8.3.50.20190719-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 19432
Reading symbols from /usr/bin/mc...
Reading symbols from /usr/lib/libslang.so.2...
(No debugging symbols found in /usr/lib/libslang.so.2)
Reading symbols from /usr/lib/libssh2.so.1...
(No debugging symbols found in /usr/lib/libssh2.so.1)
Reading symbols from /usr/lib/libglib-2.0.so.0...
Reading symbols from /usr/lib/libutil.so.1...
Reading symbols from /usr/lib/libc.so.6...
Reading symbols from /usr/lib/libdl.so.2...
Reading symbols from /usr/lib/libm.so.6...
Reading symbols from /usr/lib/libssl.so.1.1...
(No debugging symbols found in /usr/lib/libssl.so.1.1)
Reading symbols from /usr/lib/libcrypto.so.1.1...
(No debugging symbols found in /usr/lib/libcrypto.so.1.1)
Reading symbols from /usr/lib/libz.so.1...
(No debugging symbols found in /usr/lib/libz.so.1)
Reading symbols from /usr/lib/libpcre.so.1...
(No debugging symbols found in /usr/lib/libpcre.so.1)
Reading symbols from /usr/lib/libpthread.so.0...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Reading symbols from /lib64/ld-linux-x86-64.so.2...
Reading symbols from /usr/lib/libnss_files.so.2...
0x000072126e78c1fa in __GI___poll (fds=0x7ffc259e1a80, nfds=1, timeout=-1)
    at /home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/poll.c:29
29	  return SYSCALL_CANCEL (poll, fds, nfds, timeout);
(gdb) bt full
#0  0x000072126e78c1fa in __GI___poll (fds=0x7ffc259e1a80, nfds=1, timeout=-1)
    at /home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/poll.c:29
        resultvar = 18446744073709551100
        sc_ret = <optimized out>
#1  0x000072126e99b0f2 in ?? () from /usr/lib/libssh2.so.1
No symbol table info available.
#2  0x000072126e99d340 in libssh2_sftp_init () from /usr/lib/libssh2.so.1
No symbol table info available.
#3  0x00006467afa2615a in sftpfs_open_connection (super=super@entry=0x6467b0141730, mcerror=mcerror@entry=0x7ffc259e1c10)
    at connection.c:492
        rc = 0
        sftpfs_super = 0x6467b0141730
#4  0x00006467afa1c2a6 in sftpfs_cb_open_connection (super=0x6467b0141730, vpath=<optimized out>, vpath_element=0x6467b0141590)
    at vfs_subclass.c:135
        mcerror = 0x0
        sftpfs_super = 0x6467b0141730
        ret_value = 32764
#5  0x00006467af9d60eb in vfs_s_get_path (vpath=vpath@entry=0x6467b0141570, archive=archive@entry=0x7ffc259e1c80, 
    flags=flags@entry=0) at direntry.c:1195
        vpath_archive = 0x6467b01417b0
        retval = 0x6467b01332e0 ""
        result = -1
        super = 0x6467b0141730
        path_element = 0x6467b0141590
        subclass = 0x6467afa95b00 <sftpfs_subclass>
#6  0x00006467af9d61f9 in vfs_s_inode_from_path (vpath=vpath@entry=0x6467b0141570, flags=flags@entry=5) at direntry.c:395
        super = 0x27
        ino = <optimized out>
        q = <optimized out>
        path_element = <optimized out>
#7  0x00006467af9d63f3 in vfs_s_opendir (vpath=0x6467b0141570) at direntry.c:423
        dir = <optimized out>
        info = <optimized out>
        path_element = <optimized out>
#8  0x00006467af9d6479 in vfs_s_chdir (vpath=<optimized out>) at direntry.c:493
        data = <optimized out>
#9  0x00006467af9a3287 in mc_chdir (vpath=0x6467b01327c0) at interface.c:703
        old_vfs = <optimized out>
        old_vfsid = <optimized out>
        result = <optimized out>
        path_element = 0x6467b0141590
        cd_vpath = 0x6467b0141570
#10 0x00006467af9b0061 in _do_panel_cd (panel=0x6467b012a2b0, new_dir_vpath=<optimized out>, cd_type=<optimized out>)
    at panel.c:3261
        olddir_vpath = <optimized out>
#11 0x00006467af9b0d3d in do_panel_cd (panel=0x6467b012a2b0, new_dir_vpath=<optimized out>, cd_type=<optimized out>)
    at panel.c:4589
--Type <RET> for more, q to quit, c to continue without paging--c
        r = <optimized out>
#12 0x00006467af9b242f in do_cd (new_dir_vpath=new_dir_vpath@entry=0x6467b01327c0, exact=exact@entry=cd_parse_command) at panel.c:4989
        res = <optimized out>
        _new_dir_vpath = 0x6467b01327c0
        path_element = <optimized out>
#13 0x00006467af99238a in do_cd_command (orig_cmd=orig_cmd@entry=0x6467b01414c0 "cd sftp://127.0.0.1") at command.c:438
        path = 0x6467b013c310 "sftp://127.0.0.1"
        q_vpath = 0x6467b01327c0
        ok = <optimized out>
        len = <optimized out>
        operand_pos = <optimized out>
        cmd = <optimized out>
#14 0x00006467af9926a2 in enter (lc_cmdline=0x6467b00fc970) at command.c:256
        cmd = <optimized out>
        cmd = <optimized out>
        command = <optimized out>
        i = <optimized out>
        s = <optimized out>
#15 command_callback (w=0x6467b00fc970, sender=<optimized out>, msg=<optimized out>, parm=<optimized out>, data=<optimized out>) at command.c:344
No locals.
#16 0x00006467af9ac342 in send_message (data=0x0, parm=10, msg=MSG_KEY, sender=0x0, w=<optimized out>) at ../../lib/widget/widget-common.h:210
        ret = MSG_NOT_HANDLED
#17 handle_cmdline_enter () at midnight.c:1425
        i = <optimized out>
        i = <optimized out>
#18 midnight_callback (w=<optimized out>, sender=<optimized out>, msg=<optimized out>, parm=10, data=<optimized out>) at midnight.c:1494
        command = <optimized out>
#19 0x00006467af99440a in send_message (data=0x0, parm=10, msg=MSG_KEY, sender=0x0, w=0x6467b010cc00) at ../../lib/widget/widget-common.h:210
        ret = MSG_NOT_HANDLED
#20 dlg_key_event (d_key=10, h=0x6467b010cc00) at dialog.c:478
        handled = <optimized out>
        handled = <optimized out>
#21 dlg_process_event (h=0x6467b010cc00, key=10, event=<optimized out>) at dialog.c:1164
No locals.
#22 0x00006467af9947db in frontend_dlg_run (h=0x6467b010cc00) at dialog.c:544
        d_key = <optimized out>
        wh = 0x6467b010cc00
        event = {buttons = -1340925392, x = -1, y = -1348301218, type = (GPM_MOVE | GPM_DRAG | GPM_DOWN | GPM_DOUBLE | GPM_TRIPLE | unknown: 25600)}
        wh = <optimized out>
        event = <optimized out>
        d_key = <optimized out>
#23 dlg_run (h=0x6467b010cc00) at dialog.c:1197
No locals.
#24 0x00006467af9ad286 in do_nc () at midnight.c:1783
        ret = <optimized out>
#25 0x00006467af98850a in main (argc=<optimized out>, argv=<optimized out>) at main.c:409
        mcerror = 0x0
        config_migrated = 0
        config_migrate_msg = 0x0
        exit_code = 1
(gdb) frame apply all -q frame 
#0  0x000072126e78c1fa in __GI___poll (fds=0x7ffc259e1a80, nfds=1, timeout=-1) at /home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/poll.c:29
29	  return SYSCALL_CANCEL (poll, fds, nfds, timeout);
#1  0x000072126e99b0f2 in ?? () from /usr/lib/libssh2.so.1
#2  0x000072126e99d340 in libssh2_sftp_init () from /usr/lib/libssh2.so.1
#3  0x00006467afa2615a in sftpfs_open_connection (super=super@entry=0x6467b0141730, mcerror=mcerror@entry=0x7ffc259e1c10) at connection.c:492
492	    sftpfs_super->sftp_session = libssh2_sftp_init (sftpfs_super->session);
#4  0x00006467afa1c2a6 in sftpfs_cb_open_connection (super=0x6467b0141730, vpath=<optimized out>, vpath_element=0x6467b0141590) at vfs_subclass.c:135
135	    ret_value = sftpfs_open_connection (super, &mcerror);
#5  0x00006467af9d60eb in vfs_s_get_path (vpath=vpath@entry=0x6467b0141570, archive=archive@entry=0x7ffc259e1c80, flags=flags@entry=0) at direntry.c:1195
1195	        result = subclass->open_archive (super, vpath_archive, path_element);
#6  0x00006467af9d61f9 in vfs_s_inode_from_path (vpath=vpath@entry=0x6467b0141570, flags=flags@entry=5) at direntry.c:395
395	    q = vfs_s_get_path (vpath, &super, 0);
#7  0x00006467af9d63f3 in vfs_s_opendir (vpath=0x6467b0141570) at direntry.c:423
423	    dir = vfs_s_inode_from_path (vpath, FL_DIR | FL_FOLLOW);
#8  0x00006467af9d6479 in vfs_s_chdir (vpath=<optimized out>) at direntry.c:493
493	    data = vfs_s_opendir (vpath);
#9  0x00006467af9a3287 in mc_chdir (vpath=0x6467b01327c0) at interface.c:703
703	    result = (*path_element->class->chdir) (cd_vpath);
#10 0x00006467af9b0061 in _do_panel_cd (panel=0x6467b012a2b0, new_dir_vpath=<optimized out>, cd_type=<optimized out>) at panel.c:3261
3261	    if (mc_chdir (new_dir_vpath) == -1)
#11 0x00006467af9b0d3d in do_panel_cd (panel=0x6467b012a2b0, new_dir_vpath=<optimized out>, cd_type=<optimized out>) at panel.c:4589
4589	    r = _do_panel_cd (panel, new_dir_vpath, cd_type);
#12 0x00006467af9b242f in do_cd (new_dir_vpath=new_dir_vpath@entry=0x6467b01327c0, exact=exact@entry=cd_parse_command) at panel.c:4989
4989	    res = do_panel_cd (current_panel, _new_dir_vpath, exact);
#13 0x00006467af99238a in do_cd_command (orig_cmd=orig_cmd@entry=0x6467b01414c0 "cd sftp://127.0.0.1") at command.c:438
438	        ok = do_cd (q_vpath, cd_parse_command);
#14 0x00006467af9926a2 in enter (lc_cmdline=0x6467b00fc970) at command.c:256
256	        do_cd_command (cmd);
#15 command_callback (w=0x6467b00fc970, sender=<optimized out>, msg=<optimized out>, parm=<optimized out>, data=<optimized out>) at command.c:344
344	            return enter (INPUT (w));
#16 0x00006467af9ac342 in send_message (data=0x0, parm=10, msg=MSG_KEY, sender=0x0, w=<optimized out>) at ../../lib/widget/widget-common.h:210
210	        ret = WIDGET (w)->callback (WIDGET (w), WIDGET (sender), msg, parm, data);
#17 handle_cmdline_enter () at midnight.c:1425
1425	        send_message (cmdline, NULL, MSG_KEY, '\n', NULL);
#18 midnight_callback (w=<optimized out>, sender=<optimized out>, msg=<optimized out>, parm=10, data=<optimized out>) at midnight.c:1494
1494	            if (handle_cmdline_enter ())
#19 0x00006467af99440a in send_message (data=0x0, parm=10, msg=MSG_KEY, sender=0x0, w=0x6467b010cc00) at ../../lib/widget/widget--Type <RET> for more, q to quit, c to continue without paging--c
-common.h:210
210	        ret = WIDGET (w)->callback (WIDGET (w), WIDGET (sender), msg, parm, data);
#20 dlg_key_event (d_key=10, h=0x6467b010cc00) at dialog.c:478
478	    handled = send_message (h, NULL, MSG_KEY, d_key, NULL);
#21 dlg_process_event (h=0x6467b010cc00, key=10, event=<optimized out>) at dialog.c:1164
1164	        dlg_key_event (h, key);
#22 0x00006467af9947db in frontend_dlg_run (h=0x6467b010cc00) at dialog.c:544
544	        dlg_process_event (h, d_key, &event);
#23 dlg_run (h=0x6467b010cc00) at dialog.c:1197
1197	    frontend_dlg_run (h);
#24 0x00006467af9ad286 in do_nc () at midnight.c:1783
1783	        (void) dlg_run (midnight_dlg);
#25 0x00006467af98850a in main (argc=<optimized out>, argv=<optimized out>) at main.c:409
409	        exit_code = do_nc ()? EXIT_SUCCESS : EXIT_FAILURE;
(gdb) frame apply all list *$pc  
#0  0x000072126e78c1fa in __GI___poll (fds=0x7ffc259e1a80, nfds=1, timeout=-1)
    at /home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/poll.c:29
0x72126e78c1fa is in __GI___poll (/home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/poll.c:29).
24	
25	int
26	__poll (struct pollfd *fds, nfds_t nfds, int timeout)
27	{
28	#ifdef __NR_poll
29	  return SYSCALL_CANCEL (poll, fds, nfds, timeout);
30	#else
31	  struct timespec timeout_ts;
32	  struct timespec *timeout_ts_p = NULL;
#1  0x000072126e99b0f2 in ?? () from /usr/lib/libssh2.so.1
#2  0x000072126e99d340 in libssh2_sftp_init () from /usr/lib/libssh2.so.1
#3  0x00006467afa2615a in sftpfs_open_connection (super=super@entry=0x6467b0141730, mcerror=mcerror@entry=0x7ffc259e1c10)
    at connection.c:492
0x6467afa2615a is in sftpfs_open_connection (connection.c:492).
487	    if (!sftpfs_open_connection_ssh_agent (super, mcerror)
488	        && !sftpfs_open_connection_ssh_key (super, mcerror)
489	        && !sftpfs_open_connection_ssh_password (super, mcerror))
490	        return (-1);
491	
492	    sftpfs_super->sftp_session = libssh2_sftp_init (sftpfs_super->session);
493	
494	    if (sftpfs_super->sftp_session == NULL)
495	        return (-1);
#4  0x00006467afa1c2a6 in sftpfs_cb_open_connection (super=0x6467b0141730, vpath=<optimized out>, vpath_element=0x6467b0141590)
    at vfs_subclass.c:135
0x6467afa1c2a6 is in sftpfs_cb_open_connection (vfs_subclass.c:135).
130	
131	    super->root =
132	        vfs_s_new_inode (vpath_element->class, super,
133	                         vfs_s_default_stat (vpath_element->class, S_IFDIR | 0755));
134	
135	    ret_value = sftpfs_open_connection (super, &mcerror);
136	    mc_error_message (&mcerror, NULL);
137	    return ret_value;
138	}
#5  0x00006467af9d60eb in vfs_s_get_path (vpath=vpath@entry=0x6467b0141570, archive=archive@entry=0x7ffc259e1c80, 
    flags=flags@entry=0) at direntry.c:1195
0x6467af9d60eb is in vfs_s_get_path (direntry.c:1195).
1190	        vfs_path_t *vpath_archive;
1191	
1192	        vpath_archive = vfs_path_clone (vpath);
1193	        vfs_path_remove_element_by_index (vpath_archive, -1);
1194	
--Type <RET> for more, q to quit, c to continue without paging--c
1195	        result = subclass->open_archive (super, vpath_archive, path_element);
1196	        vfs_path_free (vpath_archive);
1197	    }
1198	    if (result == -1)
1199	    {
#6  0x00006467af9d61f9 in vfs_s_inode_from_path (vpath=vpath@entry=0x6467b0141570, flags=flags@entry=5) at direntry.c:395
0x6467af9d61f9 is in vfs_s_inode_from_path (direntry.c:396).
391	    struct vfs_s_inode *ino;
392	    const char *q;
393	    const vfs_path_element_t *path_element;
394	
395	    q = vfs_s_get_path (vpath, &super, 0);
396	    if (q == NULL)
397	        return NULL;
398	
399	    path_element = vfs_path_get_by_index (vpath, -1);
#7  0x00006467af9d63f3 in vfs_s_opendir (vpath=0x6467b0141570) at direntry.c:423
0x6467af9d63f3 is in vfs_s_opendir (direntry.c:424).
419	    struct vfs_s_inode *dir;
420	    struct dirhandle *info;
421	    const vfs_path_element_t *path_element;
422	
423	    dir = vfs_s_inode_from_path (vpath, FL_DIR | FL_FOLLOW);
424	    if (dir == NULL)
425	        return NULL;
426	
427	    path_element = vfs_path_get_by_index (vpath, -1);
#8  0x00006467af9d6479 in vfs_s_chdir (vpath=<optimized out>) at direntry.c:493
0x6467af9d6479 is in vfs_s_chdir (direntry.c:494).
489	vfs_s_chdir (const vfs_path_t * vpath)
490	{
491	    void *data;
492	
493	    data = vfs_s_opendir (vpath);
494	    if (data == NULL)
495	        return (-1);
496	    vfs_s_closedir (data);
497	    return 0;
498	}
#9  0x00006467af9a3287 in mc_chdir (vpath=0x6467b01327c0) at interface.c:703
0x6467af9a3287 is in mc_chdir (interface.c:705).
700	        goto error_end;
701	    }
702	
703	    result = (*path_element->class->chdir) (cd_vpath);
704	
705	    if (result == -1)
706	    {
707	        errno = vfs_ferrno (path_element->class);
708	        goto error_end;
709	    }
#10 0x00006467af9b0061 in _do_panel_cd (panel=0x6467b012a2b0, new_dir_vpath=<optimized out>, cd_type=<optimized out>) at panel.c:3261
0x6467af9b0061 is in _do_panel_cd (panel.c:3261).
3256	        element = vfs_path_get_by_index (new_dir_vpath, 0);
3257	        if (strcmp (element->path, "-") == 0)
3258	            new_dir_vpath = panel->lwd_vpath;
3259	    }
3260	
3261	    if (mc_chdir (new_dir_vpath) == -1)
3262	        return FALSE;
3263	
3264	    /* Success: save previous directory, shutdown status of previous dir */
3265	    olddir_vpath = vfs_path_clone (panel->cwd_vpath);
#11 0x00006467af9b0d3d in do_panel_cd (panel=0x6467b012a2b0, new_dir_vpath=<optimized out>, cd_type=<optimized out>) at panel.c:4589
0x6467af9b0d3d is in do_panel_cd (panel.c:4590).
4585	do_panel_cd (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum cd_type)
4586	{
4587	    gboolean r;
4588	
4589	    r = _do_panel_cd (panel, new_dir_vpath, cd_type);
4590	    if (r)
4591	        directory_history_add (panel, panel->cwd_vpath);
4592	    return r;
4593	}
#12 0x00006467af9b242f in do_cd (new_dir_vpath=new_dir_vpath@entry=0x6467b01327c0, exact=exact@entry=cd_parse_command) at panel.c:4989
0x6467af9b242f is in do_cd (panel.c:4989).
4984	        new_vpath_len = vfs_path_len (new_dir_vpath);
4985	        if (vfs_path_equal_len (new_dir_vpath, panelized_panel.root_vpath, new_vpath_len))
4986	            _new_dir_vpath = panelized_panel.root_vpath;
4987	    }
4988	
4989	    res = do_panel_cd (current_panel, _new_dir_vpath, exact);
4990	
4991	#ifdef HAVE_CHARSET
4992	    if (res)
4993	    {
#13 0x00006467af99238a in do_cd_command (orig_cmd=orig_cmd@entry=0x6467b01414c0 "cd sftp://127.0.0.1") at command.c:438
0x6467af99238a is in do_cd_command (command.c:439).
434	            q_vpath = vfs_path_from_str (mc_config_get_home_dir ());
435	        else
436	            q_vpath = vfs_path_from_str_flags (path, VPF_NO_CANON);
437	
438	        ok = do_cd (q_vpath, cd_parse_command);
439	        if (!ok)
440	            ok = handle_cdpath (path);
441	
442	        if (!ok)
443	        {
#14 0x00006467af9926a2 in enter (lc_cmdline=0x6467b00fc970) at command.c:256
0x6467af9926a2 is in command_callback (command.c:257).
252	        return MSG_HANDLED;
253	
254	    if (strncmp (cmd, "cd ", 3) == 0 || strcmp (cmd, "cd") == 0)
255	    {
256	        do_cd_command (cmd);
257	        input_clean (lc_cmdline);
258	        return MSG_HANDLED;
259	    }
260	    else if (strcmp (cmd, "exit") == 0)
261	    {
#15 command_callback (w=0x6467b00fc970, sender=<optimized out>, msg=<optimized out>, parm=<optimized out>, data=<optimized out>) at command.c:344
0x6467af9926a2 is in command_callback (command.c:257).
252	        return MSG_HANDLED;
253	
254	    if (strncmp (cmd, "cd ", 3) == 0 || strcmp (cmd, "cd") == 0)
255	    {
256	        do_cd_command (cmd);
257	        input_clean (lc_cmdline);
258	        return MSG_HANDLED;
259	    }
260	    else if (strcmp (cmd, "exit") == 0)
261	    {
#16 0x00006467af9ac342 in send_message (data=0x0, parm=10, msg=MSG_KEY, sender=0x0, w=<optimized out>) at ../../lib/widget/widget-common.h:210
0x6467af9ac342 is in midnight_callback (../../lib/widget/widget-common.h:210).
205	    cb_ret_t ret = MSG_NOT_HANDLED;
206	
207	#if 1
208	    if (w != NULL)              /* This must be always true, but... */
209	#endif
210	        ret = WIDGET (w)->callback (WIDGET (w), WIDGET (sender), msg, parm, data);
211	
212	    return ret;
213	}
#17 handle_cmdline_enter () at midnight.c:1425
0x6467af9ac342 is in midnight_callback (../../lib/widget/widget-common.h:210).
205	    cb_ret_t ret = MSG_NOT_HANDLED;
206	
207	#if 1
208	    if (w != NULL)              /* This must be always true, but... */
209	#endif
210	        ret = WIDGET (w)->callback (WIDGET (w), WIDGET (sender), msg, parm, data);
211	
212	    return ret;
213	}
#18 midnight_callback (w=<optimized out>, sender=<optimized out>, msg=<optimized out>, parm=10, data=<optimized out>) at midnight.c:1494
0x6467af9ac342 is in midnight_callback (../../lib/widget/widget-common.h:210).
205	    cb_ret_t ret = MSG_NOT_HANDLED;
206	
207	#if 1
208	    if (w != NULL)              /* This must be always true, but... */
209	#endif
210	        ret = WIDGET (w)->callback (WIDGET (w), WIDGET (sender), msg, parm, data);
211	
212	    return ret;
213	}
#19 0x00006467af99440a in send_message (data=0x0, parm=10, msg=MSG_KEY, sender=0x0, w=0x6467b010cc00) at ../../lib/widget/widget-common.h:210
0x6467af99440a is in dlg_process_event (dialog.c:481).
476	
477	    /* first can dlg_callback handle the key */
478	    handled = send_message (h, NULL, MSG_KEY, d_key, NULL);
479	
480	    /* next try the hotkey */
481	    if (handled == MSG_NOT_HANDLED)
482	        handled = dlg_try_hotkey (h, d_key);
483	
484	    if (handled == MSG_HANDLED)
485	        send_message (h, NULL, MSG_HOTKEY_HANDLED, 0, NULL);
#20 dlg_key_event (d_key=10, h=0x6467b010cc00) at dialog.c:478
0x6467af99440a is in dlg_process_event (dialog.c:481).
476	
477	    /* first can dlg_callback handle the key */
478	    handled = send_message (h, NULL, MSG_KEY, d_key, NULL);
479	
480	    /* next try the hotkey */
481	    if (handled == MSG_NOT_HANDLED)
482	        handled = dlg_try_hotkey (h, d_key);
483	
484	    if (handled == MSG_HANDLED)
485	        send_message (h, NULL, MSG_HOTKEY_HANDLED, 0, NULL);
#21 dlg_process_event (h=0x6467b010cc00, key=10, event=<optimized out>) at dialog.c:1164
0x6467af99440a is in dlg_process_event (dialog.c:481).
476	
477	    /* first can dlg_callback handle the key */
478	    handled = send_message (h, NULL, MSG_KEY, d_key, NULL);
479	
480	    /* next try the hotkey */
481	    if (handled == MSG_NOT_HANDLED)
482	        handled = dlg_try_hotkey (h, d_key);
483	
484	    if (handled == MSG_HANDLED)
485	        send_message (h, NULL, MSG_HOTKEY_HANDLED, 0, NULL);
#22 0x00006467af9947db in frontend_dlg_run (h=0x6467b010cc00) at dialog.c:544
0x6467af9947db is in dlg_run (dialog.c:546).
541	        tty_got_interrupt ();
542	        d_key = tty_get_event (&event, h->mouse_status == MOU_REPEAT, TRUE);
543	
544	        dlg_process_event (h, d_key, &event);
545	
546	        if (widget_get_state (wh, WST_CLOSED))
547	            send_message (h, NULL, MSG_VALIDATE, 0, NULL);
548	    }
549	}
#23 dlg_run (h=0x6467b010cc00) at dialog.c:1197
0x6467af9947db is in dlg_run (dialog.c:546).
541	        tty_got_interrupt ();
542	        d_key = tty_get_event (&event, h->mouse_status == MOU_REPEAT, TRUE);
543	
544	        dlg_process_event (h, d_key, &event);
545	
546	        if (widget_get_state (wh, WST_CLOSED))
547	            send_message (h, NULL, MSG_VALIDATE, 0, NULL);
548	    }
549	}
#24 0x00006467af9ad286 in do_nc () at midnight.c:1783
0x6467af9ad286 is in do_nc (midnight.c:1785).
1780	        mc_filehighlight = mc_fhl_new (TRUE);
1781	
1782	        create_file_manager ();
1783	        (void) dlg_run (midnight_dlg);
1784	
1785	        mc_fhl_free (&mc_filehighlight);
1786	
1787	        ret = TRUE;
1788	
1789	        /* dlg_destroy destroys even current_panel->cwd_vpath, so we have to save a copy :) */
#25 0x00006467af98850a in main (argc=<optimized out>, argv=<optimized out>) at main.c:409
0x6467af98850a is in main (main.c:409).
404	
405	    /* Program main loop */
406	    if (mc_global.midnight_shutdown)
407	        exit_code = EXIT_SUCCESS;
408	    else
409	        exit_code = do_nc ()? EXIT_SUCCESS : EXIT_FAILURE;
410	
411	    disable_bracketed_paste ();
412	
413	    disable_mouse ();
(gdb) 
(gdb) continue
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x000072126e78c1fa in __GI___poll (fds=0x7ffc259e1a80, nfds=1, timeout=-1)
    at /home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/poll.c:29
29	  return SYSCALL_CANCEL (poll, fds, nfds, timeout);
(gdb) next
/////// ^ yes it's stuck there!!!!!
^C
Program received signal SIGINT, Interrupt.
0x000072126e78c1fa in __GI___poll (fds=0x7ffc259e1a80, nfds=1, timeout=-1)
    at /home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/poll.c:29
29	  return SYSCALL_CANCEL (poll, fds, nfds, timeout);
(gdb) 

@howaboutsynergy

This comment has been minimized.

Copy link
Owner Author

commented Jul 20, 2019

in a new hang, I can see that
cat /proc/21514/syscall is stuck at 7 0x7ffc440b2860 0x1 0xffffffff 0x4000 0xfffffffffffffff5 0x0 0x7ffc440b2848 0x74e2961a11fa

@howaboutsynergy

This comment has been minimized.

Copy link
Owner Author

commented Jul 20, 2019

ok, mc with (at least) sftp_ip.2.patch (but not sure if that's needed or not!) from https://midnight-commander.org/ticket/3921#comment:10
coupled with sshd_config Subsystem sftp /usr/lib/openssh/sftp-server which is a file/path that doesn't exist:
ls: cannot access '/usr/lib/openssh/sftp-server': No such file or directory

causes this hang in mc!
but if using
Subsystem sftp /usr/lib/ssh/sftp-server which does exist:

-rwxr-xr-x 1 root root 108560 18.07.2019 03:34 /usr/lib/ssh/sftp-server*

then it works!

@howaboutsynergy

This comment has been minimized.

Copy link
Owner Author

commented Jul 20, 2019

if the respective sshd is killed, then mc gets unstuck via:

                                         
 +--------------- Error ---------------+ 
 |                                     | 
 | Cannot chdir to "sftp://127.0.0.1/" | 
 |          Broken pipe (32)           | 
 |                                     | 
 +-------------------------------------+ 
                                         
@howaboutsynergy

This comment has been minimized.

Copy link
Owner Author

commented Sep 19, 2019

now vim is stuck in SYSCALL_CANCEL:

$ gdb -p 198508
GNU gdb (GDB) 8.3.50.20190909-git
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
State of pagination is off.
Attaching to process 198508
Reading symbols from /usr/bin/vim...
(No debugging symbols found in /usr/bin/vim)
Reading symbols from /usr/lib/libm.so.6...
(No debugging symbols found in /usr/lib/libm.so.6)
Reading symbols from /usr/lib/libncursesw.so.6...
(No debugging symbols found in /usr/lib/libncursesw.so.6)
Reading symbols from /usr/lib/libacl.so.1...
(No debugging symbols found in /usr/lib/libacl.so.1)
Reading symbols from /usr/lib/libgpm.so.2...
(No debugging symbols found in /usr/lib/libgpm.so.2)
Reading symbols from /usr/lib/libdl.so.2...
(No debugging symbols found in /usr/lib/libdl.so.2)
Reading symbols from /usr/lib/libpthread.so.0...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Reading symbols from /usr/lib/libc.so.6...
Reading symbols from /lib64/ld-linux-x86-64.so.2...
Reading symbols from /usr/lib/libattr.so.1...
(No debugging symbols found in /usr/lib/libattr.so.1)
Reading symbols from /usr/lib/libnss_files.so.2...
(No debugging symbols found in /usr/lib/libnss_files.so.2)
0x00007f7962c6297a in __GI___select (nfds=1, readfds=0x557130b567a0, writefds=0x557130b56720, exceptfds=0x557130b566a0, timeout=0x0) at /home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/select.c:41

warning: Source file is more recent than executable.
41	  return SYSCALL_CANCEL (select, nfds, readfds, writefds, exceptfds,
(gdb) bt
#0  0x00007f7962c6297a in __GI___select (nfds=1, readfds=0x557130b567a0, writefds=0x557130b56720, exceptfds=0x557130b566a0, timeout=0x0) at /home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/select.c:41
#1  0x0000557130994bd5 in ?? ()
#2  0x0000557130994eac in ?? ()
#3  0x0000557130a37f31 in ui_wait_for_chars_or_timer ()
#4  0x00005571309940c6 in ?? ()
#5  0x0000557130a3874a in inchar_loop ()
#6  0x0000557130a37e67 in ui_inchar ()
#7  0x0000557130922278 in ?? ()
#8  0x0000557130922dcd in ?? ()
#9  0x00005571309242f8 in vgetc ()
#10 0x0000557130924609 in safe_vgetc ()
#11 0x0000557130977aa0 in normal_cmd ()
#12 0x0000557130aa4c74 in main_loop ()
#13 0x0000557130aa59d9 in vim_main2 ()
#14 0x000055713089672d in main ()
(gdb) bt2
executing: 'frame apply all -q frame'
#0  0x00007f7962c6297a in __GI___select (nfds=1, readfds=0x557130b567a0, writefds=0x557130b56720, exceptfds=0x557130b566a0, timeout=0x0) at /home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/select.c:41
41	  return SYSCALL_CANCEL (select, nfds, readfds, writefds, exceptfds,
#1  0x0000557130994bd5 in ?? ()
#2  0x0000557130994eac in ?? ()
#3  0x0000557130a37f31 in ui_wait_for_chars_or_timer ()
#4  0x00005571309940c6 in ?? ()
#5  0x0000557130a3874a in inchar_loop ()
#6  0x0000557130a37e67 in ui_inchar ()
#7  0x0000557130922278 in ?? ()
#8  0x0000557130922dcd in ?? ()
#9  0x00005571309242f8 in vgetc ()
#10 0x0000557130924609 in safe_vgetc ()
#11 0x0000557130977aa0 in normal_cmd ()
#12 0x0000557130aa4c74 in main_loop ()
#13 0x0000557130aa59d9 in vim_main2 ()
#14 0x000055713089672d in main ()
(gdb) bt3
executing: 'frame apply all list *$pc' (but line numbers are a bit innacurate!)
#0  0x00007f7962c6297a in __GI___select (nfds=1, readfds=0x557130b567a0, writefds=0x557130b56720, exceptfds=0x557130b566a0, timeout=0x0) at /home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/select.c:41
0x7f7962c6297a is in __GI___select (/home/user/build/1packages/4used/glibc/makepkg_pacman/glibc/src/glibc/sysdeps/unix/sysv/linux/select.c:41).
36	int
37	__select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
38		  struct timeval *timeout)
39	{
40	#ifdef __NR_select
41	  return SYSCALL_CANCEL (select, nfds, readfds, writefds, exceptfds,
42				 timeout);
43	#else
44	  int result;
45	  struct timespec ts, *tsp = NULL;
#1  0x0000557130994bd5 in ?? ()
#2  0x0000557130994eac in ?? ()
#3  0x0000557130a37f31 in ui_wait_for_chars_or_timer ()
#4  0x00005571309940c6 in ?? ()
#5  0x0000557130a3874a in inchar_loop ()
#6  0x0000557130a37e67 in ui_inchar ()
#7  0x0000557130922278 in ?? ()
#8  0x0000557130922dcd in ?? ()
#9  0x00005571309242f8 in vgetc ()
#10 0x0000557130924609 in safe_vgetc ()
#11 0x0000557130977aa0 in normal_cmd ()
#12 0x0000557130aa4c74 in main_loop ()
#13 0x0000557130aa59d9 in vim_main2 ()
#14 0x000055713089672d in main ()
(gdb) 

Also, this never returns(it normally does tho!):

$ xfce4-terminal --geometry 80x24 --disable-server -x ccachewatch
DBG[xfce-sm-client.c:752] xfce_sm_client_set_state(): state change: DISCONNECTED -> REGISTERING
DBG[xfce-sm-client.c:1331] xfce_sm_client_set_property_from_command(): setting CloneCommand
DBG[xfce-sm-client.c:752] xfce_sm_client_set_state(): state change: REGISTERING -> FROZEN
DBG[xfce-sm-client.c:752] xfce_sm_client_set_state(): state change: FROZEN -> IDLE

unless C-c or closing the ccachewatch xfce4-terminal window which gives one more msg:

DBG[xfce-sm-client.c:752] xfce_sm_client_set_state(): state change: IDLE -> DISCONNECTED
@howaboutsynergy

This comment has been minimized.

Copy link
Owner Author

commented Sep 19, 2019

kernel 5.3.0-g4d856f72c10e
local/glibc 2.30.9000.r86.g9681c61f11d-1 (builtbydaddy base)

copy/pasting via MMB is broken (clipboard is empty!) - I believe this is what triggered it in the first place!
ok, it works, but if I quit that xfce4-terminal, clipboard is empty! ok it's not empty anymore, it only happened once then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.