Ticket #3105 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

Crash when moving directories on different file systems

Reported by: vladmihaisima Owned by: andrew_b
Priority: critical Milestone: 4.8.11
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

When moving directories, mc crashes. The source and destinations need to be on different file systems.

Tested with:

GNU Midnight Commander 4.8.10
Built with GLib 2.36.4
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 32; void *: 32; size_t: 32; off_t: 64;

and also latest git version:

GNU Midnight Commander 4.8.10-100-g9102715
Built with GLib 2.38.1
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish
Data types: char: 8; int: 32; long: 32; void *: 32; size_t: 32; off_t: 64;

Stack trace (from the git version):

#0  label_set_text (label=0x0, text=text@entry=0xbfffef20 "Files processed: 711") at label.c:165
#1  0x08070644 in file_progress_show_count (ctx=ctx@entry=0x81f9740, done=711, total=0) at filegui.c:937
#2  0x0806c211 in erase_file (tctx=0x81f9b58, ctx=0x81f9740, vpath=0x81da8c0) at file.c:1033
#3  0x0806cf94 in move_dir_dir (tctx=tctx@entry=0x81f9b58, ctx=ctx@entry=0x81f9740, 
    s=0x81f9658 "/home/vladms/.local/src/mc/src", d=<optimized out>, d@entry=0x81d8eb8 "/tmp/ram/src") at file.c:2389
#4  0x0806ebe3 in panel_operate (source_panel=0x81e46a8, operation=operation@entry=OP_MOVE, 
    force_single=force_single@entry=0) at file.c:2892
#5  0x0805f004 in rename_cmd () at cmd.c:900
#6  0x08089595 in midnight_execute_cmd (sender=0x81e6bf0, command=22) at midnight.c:1306
#7  0x0805cb88 in send_message (data=<optimized out>, parm=<optimized out>, msg=<optimized out>, sender=<optimized out>, 
    w=<optimized out>) at ../../lib/widget/widget-common.h:162
#8  buttonbar_call (bb=0x0, i=-1073746124, i@entry=5) at buttonbar.c:154
#9  0x0805ceae in buttonbar_callback (w=0x81e6bf0, sender=0x0, msg=MSG_HOTKEY, parm=1006, data=0x0) at buttonbar.c:174
#10 0x080653ba in send_message (data=0x0, parm=1006, msg=MSG_HOTKEY, sender=0x0, w=<optimized out>)
    at ../../lib/widget/widget-common.h:162
#11 dlg_try_hotkey (d_key=1006, h=0x81e05e8) at dialog.c:463
#12 dlg_key_event (d_key=1006, h=0x81e05e8) at dialog.c:508
#13 dlg_process_event (h=h@entry=0x81e05e8, key=1006, event=event@entry=0xbffff7c4) at dialog.c:1223
#14 0x080656f6 in frontend_dlg_run (h=0x81e05e8) at dialog.c:567
#15 dlg_run (h=0x81e05e8) at dialog.c:1254
#16 0x0808b02e in create_panels_and_run_mc () at midnight.c:959
#17 do_nc () at midnight.c:1774
#18 0x08053445 in main (argc=1, argv=0xbffffa04) at main.c:401

Steps to reproduce:
1) Mount a ram disk (for ex: "mount -t ramfs none /tmp/ram; chmod 777 /tmp/ram")
2) Try to move from mc a directory with multiple files (for ex: mc/src)
3) Program crashes with above stack trace.

Change History

comment:1 Changed 11 years ago by andrew_b

  • Status changed from new to closed
  • Version master deleted
  • Resolution set to duplicate
  • Milestone Future Releases deleted

Closed as duplicate of #3059.
Please use search before create ticket.

comment:2 Changed 11 years ago by vladmihaisima

  • Status changed from closed to reopened
  • Resolution duplicate deleted

I have already used search. In my opinion this is not the same bug because:

  • as I mentioned this was tested against latest master, which includes the commit of [54a5139eec69438f8771ffddcff96a2e72a197ff], which should have fixed #3059
  • the stack trace is different.
  • the scenario seems different - this crashes fast, and does not seem to need big files too occur.

comment:3 Changed 11 years ago by andrew_b

  • Priority changed from major to critical
  • Status changed from reopened to accepted
  • Version set to master
  • Owner set to andrew_b
  • Milestone set to 4.8.11

Ok, crash if verbose is off.

comment:4 Changed 11 years ago by andrew_b

  • Branch state changed from no branch to on review

comment:5 Changed 11 years ago by andrew_b

  • Blocking 3078 added

comment:6 Changed 11 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:7 Changed 11 years ago by angel_il

  • Votes for changeset changed from slavazanko to slavazanko angel_il
  • Branch state changed from on review to approved

comment:8 Changed 11 years ago by andrew_b

comment:9 Changed 11 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from slavazanko angel_il to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:10 Changed 11 years ago by andrew_b

  • Status changed from testing to closed

comment:11 Changed 11 years ago by andrew_b

  • Blocking 3078 removed
Note: See TracTickets for help on using tickets.