public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Ed Sweetman <safemode@comcast.net>
Cc: Martin Schlemmer <azarah@nosferatu.za.org>,
	Linux Kernel Mailing Lists <linux-kernel@vger.kernel.org>
Subject: Re: audio cd writing causes massive swap and crash
Date: Thu, 22 Jul 2004 19:40:17 -0200	[thread overview]
Message-ID: <20040722214016.GO3987@suse.de> (raw)
In-Reply-To: <41004E05.8020804@comcast.net>

On Thu, Jul 22 2004, Ed Sweetman wrote:
> Martin Schlemmer wrote:
> 
> >On Thu, 2004-07-22 at 14:54, Jens Axboe wrote:
> > 
> >
> >>On Thu, Jul 22 2004, Ed Sweetman wrote:
> >>   
> >>
> >>>I've had other people test writing.  It appears that scsi-emu is not 
> >>>effected by this memory leak when writing audio cds.  So it would appear 
> >>>that ide-cd along with any of the dependent ide source files is the 
> >>>culprit. But I cannot find anywhere in ide-cd that is apparent to being 
> >>>a mem leak.  There are various conditions in ide_do_drive_cmd that state 
> >>>that the cdrom driver has to be very careful about handling but without 
> >>>intimate knowledge of the driver, I can't be sure that it's sufficiently 
> >>>handling those situations.  
> >>>
> >>>Surprisingly, it's very hard to find anyone who's used the native atapi 
> >>>mode to write an audio cd in 2.6.  Which is partly why this problem 
> >>>hasn't generated more mail traffic here I would guess. 
> >>>     
> >>>
> >>That's not true, lots of people use it. But, oddly, the leak isn't
> >>reproducable on any machine I've tested.
> >>   
> >>
> >
> >I seem to remember he noted a patch about dma during audio writing,
> >and his 'testing' if it might be the cause was to just disable dma
> >on the drive ...
> > 
> >
> 
> 
> The patch is now part of vanilla 2.6.   It was an audio dma api that was 
> a workaround for the broken dma api that only allows ide commands 
> 512bytes long.  Schilling mentioned something about this in an earlier 
> lkml posting around january.  
> 
> I've asked some other people in an irc channel to test out the problem.  
> Basically You need to be using the native atapi method for recording 
> audio.   Also, it appears that the mem leak is just what happens to some 
> people, other people like some of those who tested in the irc channel 
> experienced random program sigsevs and no mem leak at all.  It would 
> appear from this that what may be happening is the cdrom ide module is 
> mangling a pointer and either can't free it due to it possibly randomly 
> pointing to null or cause crashes due to it randomly pointing to other 
> anonymous/shared memory regions as kfree is called. That's obviously 
> just a guess.  But some sort of memory mangling is apparently 
> happening.  This is not just happening on my computer. 
> 
> 
> My drive is using udma33 and not mdma so maybe that makes the problem 
> occur more quickly.    I disabled dma to test it writing the old way but 
> it appears to be occuring in ide-cd or somewhere between cdrom.o and the 
> block device layer.  ide-scsi people dont have the problem at all 
> apparently.

Does turning on all the debug options (memory related, mostly) reveal
anything interesting?

-- 
Jens Axboe


  reply	other threads:[~2004-07-22 23:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-17 20:00 audio cd writing causes massive swap and crash Ed Sweetman
2004-07-17 19:34 ` Andrew Morton
2004-07-19  0:07   ` Chris Wedgwood
2004-07-17 20:41 ` bert hubert
2004-07-18  7:19 ` Jens Axboe
2004-07-19 12:12   ` Ed Sweetman
2004-07-19 20:26     ` Ed Sweetman
2004-07-22  4:41       ` Ed Sweetman
2004-07-22 12:54         ` Jens Axboe
2004-07-22 20:44           ` Martin Schlemmer
2004-07-22 23:30             ` Ed Sweetman
2004-07-22 21:40               ` Jens Axboe [this message]
2004-07-24 17:56               ` Ed Sweetman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040722214016.GO3987@suse.de \
    --to=axboe@suse.de \
    --cc=azarah@nosferatu.za.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=safemode@comcast.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox