Activity log for bug #1130512

Date Who What changed Old value New value Message
2013-02-20 06:35:56 tony bug added bug
2013-02-20 06:45:40 tony description I used ftp (netkit-ftp-0.17) to get some files when prompt was on, the block happened. ---- local: test1.css remote: test1.css 200 PORT command successful. 150 File status OK ; about to open data connection (#block happened. here is wating...) ---- i used strace command to find out the reason. the block happened when socket accepted. --- write(3, "RETR test1.css\r\n", 24) = 24 rt_sigaction(SIGINT, {0x805630f, [INT], SA_RESTART}, {0x805630f, [INT], SA_RESTART}, 8) = 0 read(3, "150 File status OK ; about to op"..., 1024) = 52 write(1, "150 File status OK ; about to op"..., 51) = 51 rt_sigaction(SIGINT, {0x805630f, [INT], SA_RESTART}, {0x805630f, [INT], SA_RESTART}, 8) = 0 rt_sigaction(SIGINT, {0x8057fdd, [INT], SA_RESTART}, {0x805630f, [INT], SA_RESTART}, 8) = 0 accept(5, (#wating...) ---- the source is below: ------ static FILE * dataconn(const char *lmode) { struct sockaddr_in from; int s, tos; socklen_t fromlen = sizeof(from); if (passivemode) return (fdopen(data, lmode)); s = accept(data, (struct sockaddr *) &from, &fromlen); --> (here is the problem which block happen.) if (s < 0) { perror("ftp: accept"); (void) close(data), data = -1; return (NULL); } (void) close(data); data = s; #ifdef IP_TOS tos = IPTOS_THROUGHPUT; if (setsockopt(s, IPPROTO_IP, IP_TOS, (char *)&tos, sizeof(int)) < 0) perror("ftp: setsockopt TOS (ignored)"); #endif return (fdopen(data, lmode)); } ------ i search the internet , and found accept will block the process. is it a bug? i don't kown how to deal with it. can somebody give me a hand to solve it??? thank you. I used ftp (netkit-ftp-0.17) to get some files when prompt was on, the block happened. BTW. The ftp server is 3CDeamon Version2.0 Revision10 ---- local: test1.css remote: test1.css 200 PORT command successful. 150 File status OK ; about to open data connection (#block happened. here is wating...) ---- i used strace command to find out the reason. the block happened when socket accepted. --- write(3, "RETR test1.css\r\n", 24) = 24 rt_sigaction(SIGINT, {0x805630f, [INT], SA_RESTART}, {0x805630f, [INT], SA_RESTART}, 8) = 0 read(3, "150 File status OK ; about to op"..., 1024) = 52 write(1, "150 File status OK ; about to op"..., 51) = 51 rt_sigaction(SIGINT, {0x805630f, [INT], SA_RESTART}, {0x805630f, [INT], SA_RESTART}, 8) = 0 rt_sigaction(SIGINT, {0x8057fdd, [INT], SA_RESTART}, {0x805630f, [INT], SA_RESTART}, 8) = 0 accept(5, (#wating...) ---- the source is below: ------ static FILE * dataconn(const char *lmode) {  struct sockaddr_in from;  int s, tos;  socklen_t fromlen = sizeof(from);                       if (passivemode)                       return (fdopen(data, lmode));  s = accept(data, (struct sockaddr *) &from, &fromlen); --> (here is the problem which block happen.)  if (s < 0) {   perror("ftp: accept");   (void) close(data), data = -1;   return (NULL);  }  (void) close(data);  data = s; #ifdef IP_TOS  tos = IPTOS_THROUGHPUT;  if (setsockopt(s, IPPROTO_IP, IP_TOS, (char *)&tos, sizeof(int)) < 0)   perror("ftp: setsockopt TOS (ignored)"); #endif  return (fdopen(data, lmode)); } ------ i search the internet , and found accept will block the process. is it a bug? i don't kown how to deal with it. can somebody give me a hand to solve it??? thank you.