bugThe GNU Hurd - Bugs: bug #35501, Work with memory object before it...

 
 

bug #35501: Work with memory object before it is initiated hangs the kernel.

Submitted by:  Maksym Planeta <mplaneta>
Submitted on:  Fri 10 Feb 2012 06:53:19 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: OpenReproducibility: None
Size (loc): NonePlanned Release: None
Effort: 0.00
Wiki-like text discussion box: 

Bug is present only with defpager, I work on.

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 21 Feb 2012 10:30:09 PM UTC, comment #1:

I closed this bug. But it seems to me that I was wrong. With new defpager this bug just changed behaviour. When I start test script memory ends after some time. Should be mentioned that I test only ext2fs for now, so possible bugs in tmpfs don't have any influence.

In attachments is output of vmstat that shows how it happens.

As I wrote before, new defpager uses new pageout interface, hence when kernel calls m_o_data_write defpager panics. But earlier it just evicted "fake" object, until memory ended.

(file #25103, file #25104)

Maksym Planeta <mplaneta>
Project Member
Fri 10 Feb 2012 06:53:19 PM UTC, original submission:

I was testing tmpfs for parallel writing. For this I was using following script:

#!/bin/bash
mkdir -p /tmp/log/$1
for i in {1..9}
do
fsx -N3000 $1/bar$i -S$i -l$((102410248)) -d -P /tmp/log &
done
wait

This script starts 9 fsx(1) programs. Each creates 8Mb file with own seed and tries to do 3000 operations. After some time (about half of minute) kernel hangs and following message is printed:

/hurd/mach-defpager: panic (default pager):copy/hurd/mach-defpager: panic (default pager):copy/hurd/mach-defpager: pancic (default pager):copypanic: thread_invoke:thread 30c9faa0 has unexpected state 14

The same behavior is present on ramfs+ext2fs and on pure ext2fs.

So, 1) OS completely hangs 2) the same behavior is present both in ramfs and tmpfs. That's why I think that bug is in kernel and not in defpager or tmpfs.

When I tried to investigate bug in tmpfs I found out that there was created a memory object with seqnos_memory_object_create and than seqnos_memory_object_data_write was called on this object. But function seqnos_memory_object_data_write doesn't have body since defpager uses new calling conventions.

Function m_o_data_write is called because by default new object uses old calling conventions when created. This could be changed when m_o_init is called. At the end of this function server should notify kernel that memory object is ready to use. If it is done with memory_object_ready than new calling convention should be used in future. If it is done with memory_object_set_attributes than old conventions stay.

There was no m_o_init call that's why m_o_data_write was called instead of m_o_data_return.

This bug doesn't appear when fsx programs are started consecutively and number of threads should be about 8.

(1) <a href="http://www.bddebian.com:8888/~hurd-web/user/Maksym_Planeta/#fsx_install">See</a> to install fsx.

Maksym Planeta <mplaneta>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #25103:  paste_157118 added by mplaneta (14kB - application/octet-stream)
file #25104:  paste_157119 added by mplaneta (12kB - application/octet-stream)
file #25042:  test.sh added by mplaneta (126B - application/x-shellscript - I attach test script because formatting spoiled it in initial post.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mplaneta (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 21 Feb 2012 10:30:09 PM UTCmplanetaAttached File-=>Added paste_157118, #25103
      Attached File-=>Added paste_157119, #25104
      Open/ClosedClosed=>Open
    Sun 19 Feb 2012 08:27:07 PM UTCmplanetaStatusNone=>Invalid
      Open/ClosedOpen=>Closed
      Wiki-like text discussion box=>Bug is present only with defpager, I work on.
    Fri 10 Feb 2012 06:56:17 PM UTCmplanetaAttached File-=>Added test.sh, #25042

    Back to the top


    Powered by Savane 3.1-cleanup