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.

Submitter:  Maksym Planeta <mplaneta>
Submitted:  Fri 10 Feb 2012 06:53:19 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Reproducibility:  None
Size (loc):  None Planned Release:  None
Effort:  0.00
Wiki-like text discussion box: 

Bug is present only with defpager, I work on.

* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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$((1024*1024*8)) -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>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #25103:  paste_157118 added by mplaneta (14KiB - application/octet-stream)
file #25104:  paste_157119 added by mplaneta (12KiB - 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
  • -email is unavailable- added by mplaneta (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-02-21 mplaneta Attached File- Added paste_157118, #25103
        Attached File- Added paste_157119, #25104
        Open/ClosedClosed Open
    2012-02-19 mplaneta StatusNone Invalid
        Open/ClosedOpen Closed
        Wiki-like text discussion box Bug is present only with defpager, I work on.
    2012-02-10 mplaneta Attached File- Added test.sh, #25042

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code