Opened 9 years ago

Closed 5 years ago

Last modified 5 years ago

#2316 closed defect (notsugar)

write error in unzip causes Sugar to hang

Reported by: sascha_silbe Owned by: erikos
Priority: Urgent Milestone: Unspecified
Component: Sugar Version: Git as of bugdate
Severity: Critical Keywords:
Cc: Distribution/OS:
Bug Status: New

Description

If unzip fails due to a write error, it will ask the user (on the tty, not in X) whether to continue. This causes Sugar to hang indefinitely. The Frame is inaccessible, so the only way for the user to recover from this is either using a text console (Linux virtual console) or kill the entire session (potential data loss).

Extract from shell.log:

1284305013.357660 DEBUG root: TempFilePath created dbus.String(u'/home/sascha.silbe/.sugar/default/data/3a9d2a1a-1e68-42f0-8b01-d0518cbfe755-5e92425f-4e7c-43bd-95f9-a5bc82972f66_zUiB1o.xo')
1284305013.357875 DEBUG root: TempFilePath created '/home/sascha.silbe/.sugar/default/data/3a9d2a1a-1e68-42f0-8b01-d0518cbfe755-5e92425f-4e7c-43bd-95f9-a5bc82972f66_zUiB1o.xo'
1284305013.360555 DEBUG root: locale/en_US/activity.linfo not found.
1284305013.360775 DEBUG root: locale/en/activity.linfo not found.
Archive:  /home/sascha.silbe/.sugar/default/data/3a9d2a1a-1e68-42f0-8b01-d0518cbfe755-5e92425f-4e7c-43bd-95f9-a5bc82972f66_zUiB1o.xo
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/NEWS  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/setup.py  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/call.py  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libjinglep2pclient-0.3.so.0  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libfsvalve.so  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libfarsight-0.1.so.3  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libkrb5support.so.0  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libresolv.so.2  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libgstvideoflip.so  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libgstreamer-0.10.so.0  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libgstgdp.so  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libgstgio.so  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libgstice.so  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libgstvideo4linux2.so  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libcom_err.so.2  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/telepathy-stream-engine  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libgcc_s.so.1  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libgstrtp.so  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libgstximagesink.so  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libgstvideotestsrc.so  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libjinglexmllite-0.3.so.0  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libgstrtpmuxer.so  
  inflating: /home/sascha.silbe/Activities/VideoChat.activity/tse/libjinglebase-0.3.so.0  
/home/sascha.silbe/Activities/VideoChat.activity/tse/libjinglebase-0.3.so.0:  write error (disk full?).  Continue? (y/n/^C) 

Change History (6)

comment:1 Changed 6 years ago by dnarvaez

  • Component changed from sugar-toolkit to Sugar

comment:2 Changed 6 years ago by dnarvaez

  • Bug Status changed from New to Unconfirmed

comment:3 Changed 6 years ago by dnarvaez

  • Bug Status changed from Unconfirmed to New
  • Priority changed from Unspecified by Maintainer to Urgent

I'm not sure what's a good fix but this is bad. It probably happens only on disk full. I wonder if just closing stdin would prevent it (unzip is doing an fgets, I'm not sure how it behaves with stdin closed).

comment:4 follow-up: Changed 5 years ago by SAMdroid

Hum, I think this bug has been fixed upstream. Currently we abort on an non zero exit number. Trying to extra an 18mb zip into a 1mb partition on fedora 20 behaves differently to above, though using the same options format. What happens is unzip prints all over the terminal and exits with the code 50.

I think we can close this ticket, since the upstream fix will probably roll out as quickly as any hack we do for 0.102; if it hasn't already.

I haven't checked it on other platform. But do distros really compile the gnu utils differently?

comment:5 Changed 5 years ago by dnarvaez

  • Resolution set to notsugar
  • Status changed from new to closed

Yeah this seems fixed, looking at the 6.0 code it looks like fgets is windows only.

comment:6 in reply to: ↑ 4 Changed 5 years ago by godiard

Replying to SAMdroid:

Hum, I think this bug has been fixed upstream. Currently we abort on an non zero exit number. Trying to extra an 18mb zip into a 1mb partition on fedora 20 behaves differently to above, though using the same options format. What happens is unzip prints all over the terminal and exits with the code 50.

When exit with code 50, unzip removes the partially unziped files?

Maybe in the future, we can show a message to the user if the activity was not installed.

Note: See TracTickets for help on using tickets.