Bug 251074

Summary: SIGSEGV on the server connection close during abort
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: ftpAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 7Keywords: Patch
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 0.17-41.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-08 15:30:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix. none

Description Jan Kratochvil 2007-08-06 21:47:29 UTC
Description of problem:
Occasionally during attempting to abort stuck `get' transfers the client segfaults.

Version-Release number of selected component (if applicable):
ftp-0.17-40.fc7.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. client: $ ftp server
2. client: ftp> get file
   (transfers)
3. client: CTRL-C
   (client waits on the server abort)
4. server: killall vsftpd

Actual results:
ftp> get 1
local: 1 remote: 1
227 Entering Passive Mode (192,168,66,1,99,31)
150 Opening BINARY mode data connection for 1 (854537054 bytes).
Bytes transferred: 748616
receive aborted
waiting for remote to finish abort
421 Service not available, remote server has closed connection
Segmentation fault

Expected results:
ftp> get 1
local: 1 remote: 1
227 Entering Passive Mode (192,168,66,1,235,238)
150 Opening BINARY mode data connection for 1 (854537054 bytes).
Bytes transferred: 431504
receive aborted
waiting for remote to finish abort
421 Service not available, remote server has closed connection
421 Service not available, remote server has closed connection
431504 bytes received in 1.53 secs (2.7e+02 Kbytes/sec)
ftp> _

Additional info:
receive aborted
waiting for remote to finish abort
421 Service not available, remote server has closed connection

Program received signal SIGSEGV, Segmentation fault.
_IO_new_fclose (fp=0x0) at iofclose.c:57
57        if (fp->_IO_file_flags & _IO_IS_FILEBUF)
(gdb) bt
#0  _IO_new_fclose (fp=0x0) at iofclose.c:57
#1  0x0000000000408a8d in getreply (expecteof=0) at ftp.c:486
#2  0x000000000040d0e3 in abort_remote (din=0x63fd50) at ftp.c:1992
#3  0x000000000040abe0 in recvrequest (cmd=0x4102fa "RETR", local=0x6366a0 "1",
remote=0x6235c4 "1", lmode=0x41029b "w", printnames=1)
    at ftp.c:1213
#4  0x0000000000403e9e in getit (argc=3, argv=0x61e0a0, restartit=0,
modestr=0x41029b "w") at cmds.c:765
#5  0x00000000004038c3 in get (argc=2, argv=0x61e0a0) at cmds.c:638
#6  0x000000000040ed1c in cmdscanner (top=1) at main.c:353
#7  0x000000000040e9fa in main (argc=1, argv=0x7fff644b0110) at main.c:226
(gdb) _

Comment 1 Jan Kratochvil 2007-08-06 21:47:29 UTC
Created attachment 160774 [details]
Fix.

Comment 2 Marcela Mašláňová 2007-08-07 10:56:03 UTC
Thank you for patch. Fix in rawhide, push in update.

Comment 3 Fedora Update System 2007-08-08 15:30:34 UTC
ftp-0.17-41.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.