NetBSD Problem Report #40442

From wiz@hiro.nih.at  Tue Jan 20 23:26:20 2009
Return-Path: <wiz@hiro.nih.at>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 49E6363B8BA
	for <gnats-bugs@gnats.netbsd.org>; Tue, 20 Jan 2009 23:26:20 +0000 (UTC)
Message-Id: <20090120222342.7732028E35B6@hiro.nih.at>
Date: Tue, 20 Jan 2009 23:23:42 +0100 (CET)
From: Thomas Klausner <wiz@NetBSD.org>
Reply-To: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@gnats.NetBSD.org
Subject: Meizu M6 unmount problems: cache synchronization failed
X-Send-Pr-Version: 3.95

>Number:         40442
>Category:       kern
>Synopsis:       Meizu M6 unmount problems: cache synchronization failed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 20 23:30:00 +0000 2009
>Closed-Date:    
>Last-Modified:  Fri Oct 16 16:15:02 +0000 2009
>Originator:     Thomas Klausner
>Release:        NetBSD 5.99.5
>Organization:
Curiosity is the very basis of education and if you tell me that 
curiosity killed the cat, I say only that the cat died nobly.
- Arnold Edinborough
>Environment:


Architecture: x86_64
Machine: amd64
>Description:
When unmounting the fat file system on my portable MP3 player, a
Meizu M6 SP 8GB, I have to wait for a long time, until it fails with
umass0: Phase Error, residue = 0
sd0: cache synchronization failed
>How-To-Repeat:
Plugin in a Meizu M6 SP 8GB, dmesg says:
umass0 at uhub2 port 1 configuration 1 interface 0
umass0: Meizu   Electronics MiniPlayer, rev 2.00/1.00, addr 5
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Meizu, MiniPlayer, 1.00> disk removable
sd0: 7820 MB, 7840 cyl, 16 head, 32 sec, 512 bytes/sect x 16015360 sectors

Mount the file system on it, do something, unmount:
# mount_msdos /dev/sd0a /mnt
# touch /mnt/a
# time umount /mnt

real    12m10.896s
user    0m0.000s
sys     0m0.025s
#

dmesg now contains:
umass0: Phase Error, residue = 0
sd0: cache synchronization failed
>Fix:
Yes, please.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 25 Mar 2009 08:53:18 +0000
State-Changed-Why:
It was suggested on tech-kern that this may have been fixed by ad's big
wapbl commit on 2/22. Any lucky?
(er, "luck"... silly gnats has no editor)


State-Changed-From-To: feedback->open
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 25 Mar 2009 23:09:36 +0000
State-Changed-Why:
Feedback supplied.


From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/40442 (Meizu M6 unmount problems: cache synchronization
	failed)
Date: Thu, 26 Mar 2009 00:09:13 +0100

 On Wed, Mar 25, 2009 at 08:53:19AM +0000, dholland@NetBSD.org wrote:
 > It was suggested on tech-kern that this may have been fixed by ad's big
 > wapbl commit on 2/22. Any luck?

 I've just tried on a NetBSD-5.99.8/amd64 from March 23 -- problem
 still exists.

 On plugging it in, dmesg contains:
 umass0 at uhub2 port 2 configuration 1 interface 0
 umass0: Meizu   Electronics MiniPlayer, rev 2.00/1.00, addr 5
 umass0: using SCSI over Bulk-Only
 scsibus0 at umass0: 2 targets, 1 lun per target
 sd0 at scsibus0 target 0 lun 0: <Meizu, MiniPlayer, 1.00> disk removable
 sd0: 7820 MB, 7840 cyl, 16 head, 32 sec, 512 bytes/sect x 16015360 sectors

 When unmounting, I immediately get:
 umass0: Phase Error, residue = 0
 and about 10 minutes later:
 sd0: cache synchronization failed

 Then it's not mounted any longer and I can unplug it without any
 (obvious) problems.

 I expect it to be a USB bug and not a file system one...
  Thomas

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/40442 (Meizu M6 unmount problems: cache synchronization
	failed)
Date: Thu, 26 Mar 2009 18:26:13 +0000

 On Wed, Mar 25, 2009 at 11:10:05PM +0000, Thomas Klausner wrote:
  >  I've just tried on a NetBSD-5.99.8/amd64 from March 23 -- problem
  >  still exists.

 oh well. Thanks for trying :-)

  >  When unmounting, I immediately get:
  >  umass0: Phase Error, residue = 0
  >  and about 10 minutes later:
  >  sd0: cache synchronization failed
  >  
  >  Then it's not mounted any longer and I can unplug it without any
  >  (obvious) problems.
  >  
  >  I expect it to be a USB bug and not a file system one...

 Yes, probably, but since we'd had wapbl doing wapbl things on msdosfs
 volumes, it wasn't entirely implausible...

 -- 
 David A. Holland
 dholland@netbsd.org

From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/40442 CVS commit: src/sys/dev/usb
Date: Mon, 12 Oct 2009 23:43:05 +0000

 Module Name:	src
 Committed By:	wiz
 Date:		Mon Oct 12 23:43:05 UTC 2009

 Modified Files:
 	src/sys/dev/usb: umass_quirks.c

 Log Message:
 Add quirk for Meizu M6, which doesn't like synchronize cache;
 addresses PR 40442.

 Idea for quirk from FreeBSD/hps.


 To generate a diff of this commit:
 cvs rdiff -u -r1.76 -r1.77 src/sys/dev/usb/umass_quirks.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org, Thomas Klausner <wiz@NetBSD.org>
Subject: Re: PR/40442 CVS commit: src/sys/dev/usb
Date: Tue, 13 Oct 2009 13:06:02 +0200

 Isn't it better to generically deal with the sequence of events leading
 to:

   umass0: Phase Error, residue = 0

 instead of adding a quirk?

 Martin

From: Thomas Klausner <wiz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: PR/40442 CVS commit: src/sys/dev/usb
Date: Fri, 16 Oct 2009 18:13:46 +0200

 On Tue, Oct 13, 2009 at 11:10:05AM +0000, Martin Husemann wrote:
 >  Isn't it better to generically deal with the sequence of events leading
 >  to:
 >  
 >    umass0: Phase Error, residue = 0
 >  
 >  instead of adding a quirk?

 I've tried getting the debug output that was requested in the quirks
 file.
 My main machine has a USB keyboard, so on the console I get loads of
 lines all the time; I started X and tried mounting the umass and the
 machine hung, afaict.

 Without the debugging, it usually mounts fine but has the long 12min
 hang when umounting.
  Thomas 

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.