Skip to contentSkip to conversation

ubd=mmap problem

uml-devel Sven 'Darkman' Michels 4 participants 4 messages Dec 25, 2003 – Jan 6, 2004 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

Hi there,

i started uml with udb=mmap, the box runs fine but today i noticed that the box was terminated after a nightly cron run inside the uml. While trying to figure out what the problem was, i noticed that the uml can't reboot anymore cause it hangs in an endless loop when unmounting the devices. all i saw was:
map : /proc/mm map failed, err = 9
map : /proc/mm map failed, err = 9
map : /proc/mm map failed, err = 9
map : /proc/mm map failed, err = 9
map : /proc/mm map failed, err = 9
map : /proc/mm map failed, err = 9

this was with 2.4.23 and latest uml 2.4.22 patch. So i thought its an problem with the patches and builded a fres 2.4.23 with the latest -1 patch. But the problem is still there. When i remove the udb=mmap from my startup line, uml works and reboots like expected. Anyone had that too or can tell me what the Problem is? ;) The host is running 2.4.22 with skas patch.

Regards,
Sven

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw

Alle 14:03, giovedì 25 dicembre 2003, Sven 'Darkman' Michels ha scritto:

Quoted 5 lines

Hi there,

i started uml with udb=mmap, the box runs fine but today i noticed that the box was terminated after a nightly cron run inside the uml.

This first problem is a known one. Did you mount the host root with hostfs inside Uml? If yes, check /var/log/messages and you should see an Oops from the host kernel. If that happens, apply on the host the patch in this thread on 10 Dec 2003:

[uml-devel] [PATCH] fix for: Host panic when UML reads host /dev/shm

For the second I can't help you, probably it is a still unknown bug, someone else will help you or post a fix.

Signature · 16 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#2 lore raw
Quoted 6 lines · BlaisorBlade

This first problem is a known one. Did you mount the host root with hostfs inside Uml? If yes, check /var/log/messages and you should see an Oops from the host kernel. If that happens, apply on the host the patch in this thread on 10 Dec 2003:

[uml-devel] [PATCH] fix for: Host panic when UML reads host /dev/shm

Can you please repost this patch?

Thanks,
Jeff

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#3 lore raw
In reply to Sven 'Darkman' Michels
Quoted 3 lines · [email protected] said:

i noticed that the uml can't reboot anymore cause it hangs in an endless loop when unmounting the devices. all i saw was:
map : /proc/mm map failed, err = 9

I take it this is reproducable? ubd-mmap has been stable here, so there's something about what you're doing that's sending it off the deep end.

The best way I can think to debug it is to stick printks where /proc/mm and ubd devices get opened and closed showing what file descriptor is involved. Apparently, the ubd driver is closing a file descriptor that UML thinks is a /proc/mm descriptor.

So, could you add printks for the following values in the following places -
fd in arch/um/kernel/skas/process.c:get_mm() after the os_open_file mm->context.skas.mm_fd in arch/um/kernel/skas/mmu.c:destroy_context_skas()

fd in arch/um/drivers/ubd_user.c:open_ubd_file() before the os_lock_file dev->fd and dev->cow.fd in arch/um/drivers/ubd_kern.c:ubd_close() before
their respective calls to os_close_file

Make sure that logging is set up so that printks show up in the messages file or on the console so that you don't lose any of it.

What I think you're looking for is ubd_close closing a /proc/mm descriptor. This would explain things going to hell when devices are being unmounted.

I'm a little suspicious of the fact that ubd_close doesn't set the descriptors to -1 after closing them, but I don't see a bug there offhand.

Jeff

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel