From 160d0597cb94d58f8ab273226b1f3830589a500b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 8 Jan 2013 21:08:28 +0100 Subject: hurd/translator: Implementation languages. --- hurd/translator.mdwn | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'hurd') diff --git a/hurd/translator.mdwn b/hurd/translator.mdwn index 37f4e8bc..e0baf130 100644 --- a/hurd/translator.mdwn +++ b/hurd/translator.mdwn @@ -1,5 +1,5 @@ -[[!meta copyright="Copyright © 2007, 2008, 2009, 2010, 2011, 2012 Free Software -Foundation, Inc."]] +[[!meta copyright="Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free +Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -57,6 +57,12 @@ the socket API calls (which are mapped by [[glibc]] to equivalent RPC calls)*, compared to *a [[libdiskfs]]-based translator implements a filesystem, based on a backing store*. +As a translator is not different from any other user-space application, it can +be written in any programming language. The practicable constraint is that an +interface suitable for doing [[RPC]]s should exist, which currently only exists +for C ([[microkernel/mach/MIG]]). For Lisp, Perl, [[user/jkoenig/Java]] there +so far are only experimental and incomplete implementations. + To learn how to write a translator, read the code! It is well documented, in particular, the header files. The [[Hurd_Hacking_Guide]] also has a tutorial. -- cgit v1.2.3 From 51c95fc11727532e3b0d98c8470a6b60907a0680 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 8 Jan 2013 21:31:31 +0100 Subject: IRC. --- community/gsoc/project_ideas/gcc_asan.mdwn | 25 ++ community/gsoc/project_ideas/smp.mdwn | 7 +- continuation.mdwn | 18 + glibc/signal/signal_thread.mdwn | 58 +-- hurd/libstore/nbd_store.mdwn | 11 + hurd/running/qemu/writeback_caching.mdwn | 35 +- hurd/translator/pfinet/ipv6.mdwn | 24 ++ microkernel/mach/continuation.mdwn | 24 -- microkernel/mach/deficiencies.mdwn | 10 +- microkernel/mach/gnumach.mdwn | 4 +- microkernel/mach/gnumach/continuation.mdwn | 26 ++ .../mach/gnumach/hardware_compatibility_list.mdwn | 9 +- microkernel/mach/gnumach/memory_management.mdwn | 44 +++ microkernel/mach/gnumach/preemption.mdwn | 20 + microkernel/mach/message/msgh_id.mdwn | 5 + open_issues/64-bit_port.mdwn | 80 ++++ open_issues/alarm_setitimer.mdwn | 158 +++++++- open_issues/arm_port.mdwn | 26 +- open_issues/fcntl_F_SETFL_FD.mdwn | 26 ++ open_issues/gdb_attach.mdwn | 15 + open_issues/glibc.mdwn | 15 +- open_issues/glibc/0.4.mdwn | 28 ++ open_issues/gnumach_memory_management.mdwn | 47 ++- open_issues/gnumach_page_cache_policy.mdwn | 5 +- open_issues/gnumach_tick.mdwn | 5 +- open_issues/libmachuser_libhurduser_rpc_stubs.mdwn | 8 + open_issues/libpthread.mdwn | 135 ++++++- open_issues/locking_issues.mdwn | 15 +- open_issues/multithreading.mdwn | 77 +++- .../multithreading/erlang-style_parallelism.mdwn | 5 +- open_issues/nice_vs_mach_thread_priorities.mdwn | 376 ++++++++++++++----- open_issues/open_posix_test_suite.mdwn | 12 +- open_issues/rework_gnumach_ipc_spaces.mdwn | 7 +- open_issues/rpc_stub_generator.mdwn | 99 +++++ open_issues/select.mdwn | 408 ++++++++++++++++++++- open_issues/telnet_session_crash.mdwn | 18 + open_issues/term_blocking.mdwn | 23 +- open_issues/virtualization.mdwn | 4 +- .../virtualization/remap_root_translator.mdwn | 97 +++++ user/jkoenig/java.mdwn | 26 +- 40 files changed, 1802 insertions(+), 233 deletions(-) create mode 100644 continuation.mdwn delete mode 100644 microkernel/mach/continuation.mdwn create mode 100644 microkernel/mach/gnumach/continuation.mdwn create mode 100644 microkernel/mach/gnumach/preemption.mdwn create mode 100644 open_issues/fcntl_F_SETFL_FD.mdwn create mode 100644 open_issues/glibc/0.4.mdwn create mode 100644 open_issues/rpc_stub_generator.mdwn create mode 100644 open_issues/telnet_session_crash.mdwn create mode 100644 open_issues/virtualization/remap_root_translator.mdwn (limited to 'hurd') diff --git a/community/gsoc/project_ideas/gcc_asan.mdwn b/community/gsoc/project_ideas/gcc_asan.mdwn index 229c46ec..21a30666 100644 --- a/community/gsoc/project_ideas/gcc_asan.mdwn +++ b/community/gsoc/project_ideas/gcc_asan.mdwn @@ -19,3 +19,28 @@ See also the [[valgrind]] task. A follow-up project is porting GCC's ThreadSanitizer. Possible mentors: Thomas Schwinge (tschwinge) + + +# IRC, OFTC, #gcc, 2012-12-11 + + hmm, is libtsan not multi-libbed? + richi: it only works on x86_64 right now + ugh + richi: so, it is multilibbed, but only built on multilibs and + targets which are supported + richi: as it often needs lots of RAM, it is probably not going to + be supported on 32-bit targets at all + richi: no reason not to support it on say ppc64 or sparc64 or s390x + I guess, just needs work + jakub: where is asan supported? everywhere? + richi: but then, I haven't even read what exactly libtsan does, + only looked at the atomics in there, and did the GCC side from what I + knew should be instrumented + richi: asan is right now supported on x86_64/i686, ppc/ppc64, + perhaps partially x86 darwin (don't care) and in theory arm (nobody + tested) + richi: porting isn't that hard, but the library isn't as clean as + it would be desirable portability wise + richi: that said, I don't want to spend as much time as I've done + so far on it, and in the time I'll allocate for it optimizing the code it + generates is higher on the todo list than ports to other targets diff --git a/community/gsoc/project_ideas/smp.mdwn b/community/gsoc/project_ideas/smp.mdwn index e17c2ccf..d9788e56 100644 --- a/community/gsoc/project_ideas/smp.mdwn +++ b/community/gsoc/project_ideas/smp.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -14,3 +14,8 @@ License|/fdl]]."]]"""]] # IRC, freenode, #hurd, 2012-09-30 i expect smp to be our next gsoc project + + +## IRC, freenode, #hurd, 2013-01-02 + + i'd like to mentor someone for adding smp to gnumach diff --git a/continuation.mdwn b/continuation.mdwn new file mode 100644 index 00000000..87f88f27 --- /dev/null +++ b/continuation.mdwn @@ -0,0 +1,18 @@ +[[!meta copyright="Copyright © 2013 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +Continuations are a facility which allows a thread to store its state, yield +the processor to another thread, and when it's dispatched again by the +scheduler, it can resume with its saved state. + +[[!wikipedia Continuation]] + +See also [[GNU Mach's use of +continuations|microkernel/mach/gnumach/continuation]]. diff --git a/glibc/signal/signal_thread.mdwn b/glibc/signal/signal_thread.mdwn index 5341b1ab..c6e8d69e 100644 --- a/glibc/signal/signal_thread.mdwn +++ b/glibc/signal/signal_thread.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2011 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2011, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -17,6 +17,8 @@ other threads. [[!tag open_issue_documentation]] +# IRC, freenode, #hurd, 2011-04-20 + bugs around signals are very tricky signals are actually the most hairy part of the hurd and the reason they're aynchronous is that they're handled by a @@ -46,55 +48,5 @@ other threads. sure it is but does it really matter ? mach and the hurd were intended to be "hyperthreaded" - so basically, a thread should consume only a few kernel resources - in GNU Mach, it doesn't even consume a kernel stack because only - continuations are used - and in userspace, it consumes 2 MiB of virtual memory, a few table - entries, and almost no CPU time - What does "hyperthreaded" mean: Do you have a reference? - in this context, it just means there are a lot of threads - even back in the 90s, the expected number of threads could scale - up to the thousand - today, it isn't much impressive any more - but at the time, most systems didn't have LWPs yet - and a process was very expensive - Looks like I have some catching up to do: What is "continuations" - and LWP? Maybe I also need a reference to an overview on multi-threading. - Lightweight process? - http://en.wikipedia.org/wiki/Light-weight_process - svante_: that's a whole computer science domain of its own - yes - LWPs are another names for kernel threads usually - continuations are a facility which allows a thread to store its - state, yield the processor to another thread, and when it's dispatched - again by the scheduler, it can resume with its saved state - most current kernels support kernel preemption though - which means their state is saved based on scheduler decisions - unlike continuations where the thread voluntarily saves its state - if you only have continuations, you can't have kernel preemption, - but you end up with one kernel stack per processor - while the other model allows kernel preemption and requires one - kernel stack per thread - I know resources are limited, but it looks like kernel preemption - would be nice to have. Is that too much for a GSoC student? - it would require a lot of changes in obscure and sensitive parts - of the kernel - and no, kernel preemption is something we don't actually need - even current debian linux kernels are built without kernel - preemption - and considering mach has hard limitations on its physical memory - management, increasing the amount of memory used for kernel stacks would - imply less available memory for the rest of the system - Are these hard limits in mach difficult to change? - yes - consider mach difficult to change - that's actually one of the goals of my stalled project - which I hope to resume by the end of the year :/ - Reading Wikipedia it looks like LWP are "kernel treads" and other - threads are "user threads" at least in IBM/AIX. LWP in Linux is a thread - sharing resources and in SunOS they are "user threads". Which is closest - for Hurd? - i told you - 14:09 < braunr> LWPs are another names for kernel threads usually - Similar to to the IBM definition then? Sorry for not remembering - what I've been reading. + +[[open_issues/multithreading]]. diff --git a/hurd/libstore/nbd_store.mdwn b/hurd/libstore/nbd_store.mdwn index 8560fd44..3f161ba8 100644 --- a/hurd/libstore/nbd_store.mdwn +++ b/hurd/libstore/nbd_store.mdwn @@ -23,6 +23,17 @@ License|/fdl]]."]]"""]] Perhaps the protocol was extended? +### IRC, freenode, #hurd, 2012-12-20 + + if somebody has time to spend, building the nbd package makes + pfinet crash + + +#### IRC, freenode, #hurd, 2012-12-21 + + (in the testsuite) + + ## [xNBD](https://bitbucket.org/hirofuchi/xnbd/) diff --git a/hurd/running/qemu/writeback_caching.mdwn b/hurd/running/qemu/writeback_caching.mdwn index c9c53e3e..3b6c366b 100644 --- a/hurd/running/qemu/writeback_caching.mdwn +++ b/hurd/running/qemu/writeback_caching.mdwn @@ -1,5 +1,5 @@ -[[!meta copyright="Copyright © 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, +2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -13,7 +13,8 @@ License|/fdl]]."]]"""]] [[!tag open_issue_documentation]] -IRC, freenode, #hurd, 2011-06-07 + +# IRC, freenode, #hurd, 2011-06-07 hm, i guess i should have used cache=writeback with kvm before starting the debian installer :/ @@ -57,7 +58,8 @@ IRC, freenode, #hurd, 2011-06-07 well, if there is no I/O during downloading, downloading is faster :) -IRC, freenode, #hurd, 2011-06-08 + +# IRC, freenode, #hurd, 2011-06-08 youpi: does xen provide disk caching options ? through a blktap, probably @@ -70,7 +72,8 @@ IRC, freenode, #hurd, 2011-06-08 it really makes the hurd run a lot faster as a workaround for emulators until I/O is reworked, ofc -IRC, freenode, #hurd, 2011-06-09 + +# IRC, freenode, #hurd, 2011-06-09 braunr recommends to use writeback caching with kvm. Is this really recommended with the frequent crashes I experience? @@ -88,3 +91,25 @@ IRC, freenode, #hurd, 2011-06-09 as soon as the data is present in the host page cache. This is safe as long as you trust your host. If your host crashes or loses power, then the guest may experience data corruption." (from the qemu manpage) + + +# IRC, freenode, #hurd, 2012-12-30 + + http://bugs.debian.org/622319#51 + braunr: just pointing out writeback is default since qemu 1.3.0 + that makes hurd VMs faster by default :p + ahh :) + about data loss I had read (qemu man pages?) it may occur in case of + loss of power + well yes + probably on hurd may occur even with writethrough due to non + journaled ext2 + yes but the hurd flushes everything (and i mean everything) every + 5 seconds + http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg02682.html + so it's actually less likely to lose data because of the hurd than + because of power loss + what i meant earlier is that we've never experienced unexpected + data loss because of qemu writeback policy + if data is in the host cache and you lose power, qemu or not, you + lose data diff --git a/hurd/translator/pfinet/ipv6.mdwn b/hurd/translator/pfinet/ipv6.mdwn index d30cc850..edd31017 100644 --- a/hurd/translator/pfinet/ipv6.mdwn +++ b/hurd/translator/pfinet/ipv6.mdwn @@ -70,3 +70,27 @@ Amongst other things, support for [[IOCTL]]s is missing. ok i'd like to set this up on my VMs but it looks bugged :/ i can't manage to set correctly set the gateway + + +### IRC, freenode, #hurd, 2012-12-12 + + hm, pfinet seems not to support ipv6 well at all :( + braunr: really? + pinotree: i can't manage to set a global address statically and + make it communicate with neighbours + pfinet receives the advertisement (during neighbour discovery) but + immediately resends the same solicitation again + According to the pfinet/README IPv6 support was added in 2007 + from Linux 2.2.14 while the rest is from 2.2.12 + according to me, bugs were added at the same time + :p + in addition, ipv6 in linux 2.2 was, uh, not working well either + even with 2.4, it was still messy + maybe we should try to upgrade the TCP/IP stack to something + 2.6+? + (a lot of work though) + we've already had that discussion + Yes. What is the best way forward, a GSoC task? + There is one already: + http://www.gnu.org/software/hurd/community/gsoc/project_ideas/tcp_ip_stack.html + personally, i'd advocate resuing code from netbsd diff --git a/microkernel/mach/continuation.mdwn b/microkernel/mach/continuation.mdwn deleted file mode 100644 index 7a3267f3..00000000 --- a/microkernel/mach/continuation.mdwn +++ /dev/null @@ -1,24 +0,0 @@ -[[!meta copyright="Copyright © 2010 Free Software Foundation, Inc."]] - -[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable -id="license" text="Permission is granted to copy, distribute and/or modify this -document under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with no Invariant -Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license -is included in the section entitled [[GNU Free Documentation -License|/fdl]]."]]"""]] - -[[Mach]] internally uses *continuation*s for kernel [[thread]] management. - -The advantage is that not a full kernel thread stack has to be preserved in -case that a thread is about to enter a blocking state. This saves space. It -is not clear this is still worthwhile given today's RAM offerings. (How many -kernel threads are there, typically?) - -And, this would no longer be possible in case Mach were be made a -[[preemptive|preemtion]] kernel. In the latter case, the kernel itself, that -is, kernel threads can be preempted, and then their full state needs to be -preserved. - -[[!tag open_issue_documentation]] diff --git a/microkernel/mach/deficiencies.mdwn b/microkernel/mach/deficiencies.mdwn index e1f6debc..9ba67219 100644 --- a/microkernel/mach/deficiencies.mdwn +++ b/microkernel/mach/deficiencies.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -520,3 +520,11 @@ In context of [[open_issues/multithreading]] and later [[open_issues/select]]. for those interested, x15 is now a project of its own, with no gnumach compability goal, and covered by gplv3+ + + +### IRC, freenode, #hurd, 2012-12-31 + + bits of news about x15: it can now create tasks, threads, vm_maps, + physical maps (cpu-specific page tables) for user tasks, and stack + tracing (in addition to symbol resolution when symbols are available) + were recently added diff --git a/microkernel/mach/gnumach.mdwn b/microkernel/mach/gnumach.mdwn index edd0cfdb..894adc76 100644 --- a/microkernel/mach/gnumach.mdwn +++ b/microkernel/mach/gnumach.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2001, 2002, 2007, 2008, 2011 Free Software +[[!meta copyright="Copyright © 2001, 2002, 2007, 2008, 2011, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable @@ -79,6 +79,8 @@ GNU/Hurd. * [[Debugging]] * [[Boot_Trace]] * [[Memory_Management]] + * [[Continuation]]s + * [[Preemption]] * [[Projects]] * [[Rules]] * [[Open Issues|tag/open_issue_gnumach]] diff --git a/microkernel/mach/gnumach/continuation.mdwn b/microkernel/mach/gnumach/continuation.mdwn new file mode 100644 index 00000000..cdd942b7 --- /dev/null +++ b/microkernel/mach/gnumach/continuation.mdwn @@ -0,0 +1,26 @@ +[[!meta copyright="Copyright © 2010, 2012, 2013 Free Software Foundation, +Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag open_issue_gnumach]] + +[[Mach]] internally uses *[[/continuation]]*s for kernel [[thread]] management. + +The advantage is that not a full kernel thread stack has to be preserved in +case that a thread is about to enter a blocking state. This saves space. It +is not clear this is still worthwhile given today's RAM offerings. (How many +kernel threads are there, typically?) + +And, this would no longer be possible in case Mach were be made a +[[preemptive|preemption]] kernel. In the latter case, the kernel itself, that +is, kernel threads can be preempted, and then their full state needs to be +preserved. + +See also [[open_issues/multithreading]]. diff --git a/microkernel/mach/gnumach/hardware_compatibility_list.mdwn b/microkernel/mach/gnumach/hardware_compatibility_list.mdwn index 874f5f07..3a4f560c 100644 --- a/microkernel/mach/gnumach/hardware_compatibility_list.mdwn +++ b/microkernel/mach/gnumach/hardware_compatibility_list.mdwn @@ -1,5 +1,5 @@ -[[!meta copyright="Copyright © 2007, 2008, 2009, 2011 Free Software Foundation, -Inc."]] +[[!meta copyright="Copyright © 2007, 2008, 2009, 2011, 2013 Free Software +Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -91,6 +91,11 @@ Configuration](http://www.gnu.org/software/hurd/gnumach-doc/Configuration.html) contains a list of device drivers that are included in GNU Mach and elaborates on the hardware devices they support. +## DDE + +[[hurd/DDE]] provides more up-to-date network device drivers, based on Linux +2.6.29 code, running as user-space processes. + # User Success Reports These boards are known to work. Gnumach/Hurd has been installed and run on these board successfully. diff --git a/microkernel/mach/gnumach/memory_management.mdwn b/microkernel/mach/gnumach/memory_management.mdwn index 3e158b7c..a1d9a99d 100644 --- a/microkernel/mach/gnumach/memory_management.mdwn +++ b/microkernel/mach/gnumach/memory_management.mdwn @@ -133,3 +133,47 @@ License|/fdl]]."]]"""]] using sysenter/sysexit makes it even faster [[open_issues/system_call_mechanism]]. + + +# IRC, freenode, #hurd, 2012-12-12 + + youpi: is the 2g split patch really needed ? + or rather, is it really a good thing for most people ? + instead of the common 3g/1g + it reduces tasks' address space but allows the kernel to reference + more physical memory + the thing is, because of the current page cache implementation, + most of the time, this physical memory remains unused, or very rarely + ? + on the other hand, a larger address space for tasks allows running + more threads (more space for tasks) and not failing while linking webkit + .. :) + it's needed for quite a few compilations, yes + if you refer to the link stage, with a decent amount of swap, it + goes without trouble + well, if your kernel doesn't have 2GiB physical addressing + capacity, userspace won't have >2GiB memory capacity either + does it now? + it didn't use to + and it was crawling like hell for some builds + (until simply hanging) + i never have a problem e.g. runing the big malloc glibc test + (bug22 or something like that) + that doesn't involve objects from the fs, does it? + no + as long as it's anonymous memory, it's ok + the default pager looks safe, i'm pretty sure our lockups are + because of something in ext2fs + braunr: well, an alternative would be to build two kernels, one 2/2 + and one 3/1 + not really worth it + i was just wondering + i usually prefer a 3/1 on darnassus, but i don't build as often as + a buildd :x + or we can go with 2.5/1.5 + I can do that on bach & mozart for instance + (they have their own kernel anyway) + youpi: if you think it's worth the effort + again, i was just wondering out loud + braunr: well, bach & mozart don't have > 1.2GiB mem anyway + so it doesn't pose problem diff --git a/microkernel/mach/gnumach/preemption.mdwn b/microkernel/mach/gnumach/preemption.mdwn new file mode 100644 index 00000000..520f7bc9 --- /dev/null +++ b/microkernel/mach/gnumach/preemption.mdwn @@ -0,0 +1,20 @@ +[[!meta copyright="Copyright © 2010, 2012, 2013 Free Software Foundation, +Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag open_issue_gnumach]] + +There currently is no kernel preemption in GNU Mach. + +If GNU Mach were made a a preemptive kernel, using [[continuation]]s would +probably no longer make sense as the kernel itself, that is, kernel threads can +be preempted, and then their full state needs to be preserved. + +See also [[open_issues/multithreading]]. diff --git a/microkernel/mach/message/msgh_id.mdwn b/microkernel/mach/message/msgh_id.mdwn index 986fcbc7..a7157a37 100644 --- a/microkernel/mach/message/msgh_id.mdwn +++ b/microkernel/mach/message/msgh_id.mdwn @@ -252,3 +252,8 @@ files. that adds a gnumach.defs interface tschwinge: if you think it's ok, i'll rewrite a formal changelog so it can be applied + + +## IRC, freenode, #hurd, 2012-09-30 + + youpi: hey, didn't see you merged the page cache stats branch :) diff --git a/open_issues/64-bit_port.mdwn b/open_issues/64-bit_port.mdwn index 2d273ba1..66da44b9 100644 --- a/open_issues/64-bit_port.mdwn +++ b/open_issues/64-bit_port.mdwn @@ -57,3 +57,83 @@ the [[microkernel/mach/gnumach/ports/Xen]] platform. and switching to long mode, then jumping to c code to complete the initialization i think i'll go the second way with x15, so you'll have the two :) + + +# IRC, freenode, #hurd, 2012-12-12 + +In context of [[microkernel/mach/gnumach/memory_management]]. + + Or with a 64-bit one? ;-P + tschwinge: i think we all had that idea in mind :) + tschwinge: patches welcome :P + tschwinge: sure, please help us settle down with the mig stuff + what was blocking me was just deciding how to do it + hum, what's blocking x86_64, except time to work on it ? + deciding the mig types & such things + i.e. the RPC ABI + ok + easy answer: keep it the same + sorry, let me rephrase + decide what ABI is supposed to be on a 64bit system, so as to know + which way to rewrite the types of the kernel MIG part to support 64/32 + conversion + can't this be done in two steps ? + well, it'd mean revamping the whole kernel twice + as the types at stake are referenced in the whole RPC code + the first step i imagine would simply imply having an x86_64 + kernel for 32-bits userspace, without any type change (unless restricting + to 32-bits when a type is automatically enlarged on 64-bits) + it's not so simple + the RPC code is tricky + and there are alignments things that RPC code uses + which become different when build with a 64bit compiler + there are also things like int[N] for io_stat_struct and so on + i see + making the code wrong for 32 + thus having to change the types + pinotree: yes + (doesn't mig support structs, or it is too clumsy to be used in + practice?) + pinotree: what's the problem with that (i explcitely said changing + int to e.g. int32_t) + that won't fly for some of the calls + e.g. getting a thread state + pinotree: no it doesn't support struct + braunr: that some types in struct stat are long, for instance + pinotree: same thing with longs + youpi: why wouldn't it ? + that wouldn't work on a 64bit system + so we can't make it int32_t in the interface definition + i understand the alignment issues and that the mig code adjusts + the generated code, but not the content of what is transfered + well of course + i'm talking about the first step here + which targets a 32-bits userspace only + ok, so we agree + the second step would have to revamp the whole RPC code again + i imagine the first to be less costly + well, actually no + you're right, the mig stuff would be easy on the application side, + but more complicated on the kernel side, since it would really mean + dealing with 64-bits values there + (unless we keep a 3/1 split instead of giving the full 4g to + applications) + +See also [[microkernel/mach/gnumach/memory_management]]. + + (I don't see what that changes) + if the kernel still runs with 32-bits addresses, everything it + recevies from or sends through mig can be stored with the user side + 32-bits types + err, ok, but what's the point of the 64bit kernel then ? :) + and it simply uses 64-bits addresses to deal with physical memory + ok + that could even be a 3.5/0.5 split then + but the memory model forces us to run either at the low 2g or the + highest ones + but linux has 3/1, so we don't need that + otherwise we need an mcmodel=medium + we could do with mcmodel=medium though, for a time + hm actually no, it would require mcmodel=large + hum, that's stupid, we can make the kernel run at -2g, and use 3g + up to the sign extension hole for the kernel map diff --git a/open_issues/alarm_setitimer.mdwn b/open_issues/alarm_setitimer.mdwn index 3255683c..34428586 100644 --- a/open_issues/alarm_setitimer.mdwn +++ b/open_issues/alarm_setitimer.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -29,3 +29,159 @@ for a signal, while on GNU/Hurd it gets a new alarm and exits. it seems doesn't seem to leave a timer disarmed when the interval is set to 0 (which means a one shot timer is actually periodic ..) + + +## IRC, freenode, #hurd, 2012-12-26 + + youpi: tschwinge: the setitimer issue + http://www.gnu.org/software/hurd/open_issues/alarm_setitimer.html) is + because of the global preemptor installed by setitimer not being run when + sigalrm is catched + if anyone has a good definition for a preemptor, let us know (mine + is currently "something that is scanned on signal delivery and can alter + this delivery") + I don't have any better definition + braunr: ah, that explains indeed + thanks + i think i found the problem :) + seems to be a minor overlook from drepper + (or the real author if he was only the committer) + hurd_preempt_signals augments _hurdsig_preempted_set with the + signals from the installed preemptor + but the inline version in setitimer doesn't + and post_signal actually checks that + the preemptor itself looks wrong, since its sigcode range is 0, 0 + whereas SI_TIMER is used when raising SIGALRM ... + ah but that's a recent change, right + it came with "implement SA_SIGINFO signal handlers" + (e19a2fad70b187e5efe79768f86a1f05cb5e0390, Tue Feb 21 02:41:18 2012) + yes, fixed :) + patch committed at + http://git.savannah.gnu.org/cgit/hurd/glibc.git/log/?h=rbraun/setitimer_fix + and pushed to the debian package + + +## IRC, freenode, #hurd, 2012-12-27 + + do we know any application that was broken because of setitimer ? + braunr: bits in the python and perl test suites + ok + + +## IRC, freenode, #hurd, 2012-12-28 + + braunr: ah, also libglib-perl's testsuite is affected by the + alarm/setitimer issue + pinotree: only tests ? :( + braunr: yeah + ok, we don't win that much on this fix, but anyway, still good to + have + but that source is pretty quick to compile and check + braunr: eh, so far that's what i found myself + + +## IRC, freenode, #hurd, 2013-01-04 + +See also [[select]]. + + bummer, we have broken ghc completely with the latest glibc patches + youpi: what do you mean? + pinotree: it just hangs on installation + pinotree: it seems ghc was disturbed by the setitimer patch + pinotree: http://paste.debian.net/221807/ + pinotree: it seems to be simply due to nested locking of + _hurd_siglock :/ + pinotree: I wonder whether this code has ever been really tested + oops + braunr: my comments above were for you actually :) + braunr: see the update I've just commited to the debian patch + I've added a parameter to setitimer_locked, to know whether the + lock is already taken or not + that does fix ghc + as well as the gdb ntpdate hang, apparently + I can confirm that the single-select patch breaks ntpdate for some + reason + I wonder whether it could be due to port set behavior being + different from single reply port + I believe I understand what happens + it's a know issue in select + it's not interruptible by a SIGALRM for instance + which is what ntpdate uses + when __io_select is used, it *is* interruptible + but when __mach_msg is used, it is *not* interruptible + it happens that by luck, ntpdate uses just one fd, and thus it's + __io_select which is used, and thus it gets an interruption after 1s + (instead of after 60s, the timeout) + with braunr's patch, it's __mach_msg which is used to wait, and + thus the interruption doesn't happen, and we have to wait 60s, the + timeout... + so braunr's patch is still correct, it's the __mach_msg call which + we do need to make interruptible (it was already on the todolist) + I'll rebuild ntpdate with a 1s timeout + that'll at least fix that + rah, no, doesn't work, it insists on getting its alarm + Mmm, no, the __mach_msg call doesn't even return + even though MACH_RCV_TIMEOUT is set, and to is 1000 + youpi: i see + gnu_srs: and you, see how youpi analysed and understood the + problem, instead of just guessing :p + youpi: it doesn't return ? + iirc, the __mach_msg wrapper deals with the interruptible flag + braunr: yes, __mach_msg deals with the interruptible flag by + looping ! + and the info page says it: if it's interrupted too often, it may + just never return + that's what actually happens here + (ntpdate sets an itimer more often than every 1s) + youpi: ew :) + I'll test a bit more, and submit a patch + youpi: otoh a _locker function usually means it expects a locked + mutex ;) + i also i wondered whether there could be a race in the settimer + mini-thread, between its mach_msg and its reading of the interval + pinotree: right, we could as well just lock anyway + there could be indeed + youpi: i don't know much about the internals of signal + dispatching, but could it happen the following: + in timer thread, mach_msg expires → sig_post_request → before + the main thread receives/processes the signal, the timer thread iterates + again on its while(1), using the same interval previously used + ? + did you check the comment above __msg_sig_post_request? + ah ok + I'm not sure how that works, but it's supposed to :) + just wonder: wouldn't it be simplier if the logic to change the + timeout would be in the timer thread, instead of relying on the main + thread adjusting it? + maybe there are some semantic details that wouldn't be right with + such approach + i see + i guess so if the new interval is 0, the thread can be properly + suspened (or killed, if the former fails) + could be something like this, yes + youpi: ah, wrt your comments of tonight: at least with the + current setitimer patch (in -38), a simple alarm() test app works, and i + saw few python tests can be reenabled now + ok + so even if not totally correct, at least it had some positive + effects + youpi: wrt the double lock issue of _hurd_siglock, what about + using the "crit" parameter of setitimer_locked? + it may have various values + depending whether we're already in the critical section etc. + restart_itimer does not take that lock, so we could check + whether crit is null, and in that case not even bothering to check the + signal preemptors, since it was called as a result of own setitimer + thread? + I'd rather avoid binding whether the mutex is held to whether the + call is coming from the actual premptor + again, crit may be null if we're already in the critical section + when setitimer is called + setitimer already does unclean things with preemptors + not a good thing to add more :) + fair enough, so a simple bool should do the job + i mean, the whole thing is "cheezoid" :) + it probably needs a rewrite some day + so "in the meantime" (of years, i know) + braunr: and temporary, too + but a bool is fine too, sure :) diff --git a/open_issues/arm_port.mdwn b/open_issues/arm_port.mdwn index 2d8b9038..65a82d92 100644 --- a/open_issues/arm_port.mdwn +++ b/open_issues/arm_port.mdwn @@ -12,7 +12,31 @@ Several people have expressed interested in a port of GNU/Hurd for the ARM architecture. -# IRC, freenode, #hurd, 2012-10-09 +# IRC, freenode, #hurd, 2012-07-28 + + Has anyone heard about porting hurd and gnu/mach to arm + architecture? + mcsim: i think so + mcsim: why are you asking ? + I found an article where author stated that he has ported hurd to + arm, but I have never met this information before. + He wrote ethernet driver and managed to use ping command + author's name is Sartakov Vasily + well that's possible, a long time ago + and it was probably not complete enough to be merged upstream + like many other attempts at many other things + Not so long. Article is dated by June 2011. + do you have a link ? + Yes, but it is in Russian. + oh + well i don't remember him sharing that with us + mcsim: he did some work on porting Mach, but AIUI never got it + nearly finished + nowadays he does L4 stuff + was also at FOSDEM + + +## IRC, freenode, #hurd, 2012-10-09 bootinfdsds: There was an unfinished port to arm, if you're interested. diff --git a/open_issues/fcntl_F_SETFL_FD.mdwn b/open_issues/fcntl_F_SETFL_FD.mdwn new file mode 100644 index 00000000..4d270250 --- /dev/null +++ b/open_issues/fcntl_F_SETFL_FD.mdwn @@ -0,0 +1,26 @@ +[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!meta title="fcntl.*F_SETFL.*FD_.*"]] + +[[!tag open_issue_porting]] + + +# IRC, OFTC, #debian-hurd, 2012-12-16 + + http://lists.debian.org/<50CE505F.3040106@pyro.eu.org> + or http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=679198#123 + too + ouch, there are quite a few! + most are "duplicated", like the source in webkit2 copies (so + fixing it once upstream will make it fixed progressively once the copies + are upgraded) + ah, ok + similar for ruby 1.8/1.9/jruby diff --git a/open_issues/gdb_attach.mdwn b/open_issues/gdb_attach.mdwn index 4e4f2ea0..8f1b7b48 100644 --- a/open_issues/gdb_attach.mdwn +++ b/open_issues/gdb_attach.mdwn @@ -39,3 +39,18 @@ License|/fdl]]."]]"""]] pinotree: it uses setjmp hm random corruptions :/ definitely looks like a concurrency problem + + +# IRC, freenode, #hurd, 2012-05-23 + + + /build/buildd-gdb_7.4really-1-hurd-i386-UKStgK/gdb-7.4really/gdb/thread.c:72: + internal-error: inferior_thread: Assertion `tp' failed. + arg + pinotree: Been doing anything "special"? Is it reproducible? + trying to debug something + Indeed. ;-) + i'm not sure i'm doing anything special, just trying to attach a + process + That is supposed to work. + If the permission match. diff --git a/open_issues/glibc.mdwn b/open_issues/glibc.mdwn index e2b968c9..2751c377 100644 --- a/open_issues/glibc.mdwn +++ b/open_issues/glibc.mdwn @@ -1196,9 +1196,6 @@ There is quite a baseline of failures. * `tst-array*` - Failures also seen on GNU/Linux; [[!message-id - "50950082.1070906@df1tl.local.here"]]. - gcc-4.6 tst-array1.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -frounding-math -g -Wno-parentheses -Wstrict-prototypes -I../include -I[...]/tschwinge/Roger_Whittaker.build-gcc-4.6-486/ gcc-4.6 -nostdlib -nostartfiles -o [...]/tschwinge/Roger_Whittaker.build-gcc-4.6-486/elf/tst-array1 -Wl,-dynamic-linker=/lib/ld.so.1 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both [...]/tschwinge/Roger_Whittaker.build-gcc-4.6-486 [...]/tschwinge/Roger_Whittaker.build-gcc-4.6-486/elf/ld.so.1 --library-path [...]/tschwinge/Roger_Whittaker.build-gcc-4.6-486:[...]/tschwinge/Roger_Whittaker.build-gcc-4.6-486/math:[...]/tschwinge/Roger_Whittaker.build-gcc-4.6-486/elf:[ @@ -1232,6 +1229,18 @@ There is quite a baseline of failures. `tst-array5-static` passes. + IRC, freenode, #glibc, 2012-11-01: + + tschwinge: I saw the array tests fail, built a new binutils and + a new compiler configured with new binutils and the failures went + away. + So they may depend on having new-enough GCC configured with + new-enough binutils, or something like that. + jsm28: Did you use gcc 4.7 or trunk? + tuliom: 4.7. + + [[!message-id "50950082.1070906@df1tl.local.here"]]. + * `tst-audit1.out`, `tst-audit2.out` SIGKILL. diff --git a/open_issues/glibc/0.4.mdwn b/open_issues/glibc/0.4.mdwn new file mode 100644 index 00000000..a8892876 --- /dev/null +++ b/open_issues/glibc/0.4.mdwn @@ -0,0 +1,28 @@ +[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag open_issue_glibc open_issue_libpthread]] + + +# IRC, freenode, #hurd, 2012-12-14 + +In context of [[packaging_libpthread]]/[[libpthread]]. + + once libc is switched internally from cthreads to pthreads (thus + breaking its BC), may be worth cleanup the hurd-specific exported symbols + pinotree: Yes. If you already have ideas about what to clean + up, feel free to add a new page or a section on open_issues/glibc. + we're gonna break backwards compatibility in glibc on hurd? that + could be the perfect moment to fix the /dev/fd/N problem without adding + new RPCs, though we'd probably have to break backwards-compatibility in + the exec server IIRC... + pochu: Oh, I have to re-read that discussion, but thanks for + reminding! + pochu: Won't happen today or tomorrow, but "sometime". diff --git a/open_issues/gnumach_memory_management.mdwn b/open_issues/gnumach_memory_management.mdwn index e5e9d2c5..46454207 100644 --- a/open_issues/gnumach_memory_management.mdwn +++ b/open_issues/gnumach_memory_management.mdwn @@ -1,4 +1,5 @@ -[[!meta copyright="Copyright © 2011, 2012 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2011, 2012, 2013 Free Software Foundation, +Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -1026,6 +1027,9 @@ There is a [[!FF_project 266]][[!tag bounty]] on this task. < braunr> cache for kernel map entries in vm_map ? < braunr> the comment for mem_cpu_pool_get doesn't apply in gnumach, as there is no kernel preemption + +[[microkernel/mach/gnumach/preemption]]. + < braunr> "Don't attempt mem GC more frequently than hz/MEM_GC_INTERVAL times a second. < braunr> " @@ -2182,3 +2186,44 @@ There is a [[!FF_project 266]][[!tag bounty]] on this task. also, i wrote the implementation in userspace, without functionality pmap provides (although i could have emulated it afterwards) + + +# IRC, freenode, #hurd, 2013-01-06 + + braunr: panic: vm_map: kentry memory exhausted + youpi: ouch + that's what I usually get + ok + the kentry area is a preallocated memory area that is used to back + the vm_map_kentry cache + objects from this cache are used to describe kernel virtual memory + so in this case, i simply assume the kentry area must be enlarged + (currently, both virtual and physical memory is preallocated, an + improvement could be what is now done in x15, to preallocate virtual + memory only + ) + Mmm, why do we actually have this limit? + the kentry area must be described by one entry + ah, sorry, vm/vm_resident.c: kentry_data = + pmap_steal_memory(kentry_data_size); + a statically allocated one + I had missed that one + previously, the zone allocator would do that + the kentry area is required to avoid recursion when allocating + memory + another solution would be a custom allocator in vm_map, but i + wanted to use a common cache for those objects too + youpi: you could simply try doubling KENTRY_DATA_SIZE + already doing that + we might even consider a much larger size until it's reworked + well, it's rare enough on buildds already + doubling should be enough + or else we have leaks + right + it may not be leaks though + it may be poor map entry merging + i'd expected the kernel map entries to be easier to merge, but it + may simply not be the case + (i mean, when i made my tests, it looked like there were few + kernel map entries, but i may have missed corner cases that could cause + more of them to be needed) diff --git a/open_issues/gnumach_page_cache_policy.mdwn b/open_issues/gnumach_page_cache_policy.mdwn index d128c668..22b05953 100644 --- a/open_issues/gnumach_page_cache_policy.mdwn +++ b/open_issues/gnumach_page_cache_policy.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -282,6 +282,9 @@ License|/fdl]]."]]"""]] dropped again... what seems very weird though is that we're normally using continuations + +[[microkernel/mach/gnumach/continuation]]. + braunr: you mean in the kernel? how is that relevant to the topic at hand?... antrik: continuations have been designed to reduce the number of diff --git a/open_issues/gnumach_tick.mdwn b/open_issues/gnumach_tick.mdwn index eed447f6..f29df6de 100644 --- a/open_issues/gnumach_tick.mdwn +++ b/open_issues/gnumach_tick.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -17,6 +17,9 @@ License|/fdl]]."]]"""]] it is true? yes and it's not preemptible + +[[microkernel/mach/gnumach/preemption]]. + braunr: that means a gnumach kernel currently has a maximum uptime of almost 500 days pinotree: what do you mean ? diff --git a/open_issues/libmachuser_libhurduser_rpc_stubs.mdwn b/open_issues/libmachuser_libhurduser_rpc_stubs.mdwn index 57eb403d..80fe36f8 100644 --- a/open_issues/libmachuser_libhurduser_rpc_stubs.mdwn +++ b/open_issues/libmachuser_libhurduser_rpc_stubs.mdwn @@ -113,3 +113,11 @@ License|/fdl]]."]]"""]] out? pinotree: That discussion has not yet come to a conclusion, I think. (I'd say: yes.) + + +# IRC, freenode, #hurd, 2012-12-17 + + what was the idea about using the rpc stubs currently in + libmachuser and libhurduser? should they be linked to explicitly, or + assume libc brings them? + pinotree: libc should bring them diff --git a/open_issues/libpthread.mdwn b/open_issues/libpthread.mdwn index befc1378..05aab85f 100644 --- a/open_issues/libpthread.mdwn +++ b/open_issues/libpthread.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2010, 2011, 2012 Free Software Foundation, +[[!meta copyright="Copyright © 2010, 2011, 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable @@ -1257,6 +1257,19 @@ There is a [[!FF_project 275]][[!tag bounty]] on this task. i'll add traces to know which step causes the error +### IRC, freenode, #hurd, 2012-12-11 + + braunr: mktoolnix seems like a reproducer for the libports thread + priority issue + (3 times) + youpi: thanks + youpi: where is that tool packaged ? + he probably means the mkvtoolnix source + seems so + i don't find anything else + that's it, yes + + ## IRC, freenode, #hurd, 2012-12-05 tschwinge: i'm currently working on a few easy bugs and i have @@ -1326,3 +1339,123 @@ There is a [[!FF_project 275]][[!tag bounty]] on this task. i wondered for a long time why the load average was so high on the hurd under even "light" loads now i know :) + + +## IRC, freenode, #hurd, 2012-12-27 + + btw, good news: the installer works with libpthread + (well, at least boots, I haven't tested the installation) + i can do that if the image is available publically + youpi: the one thing i suspect won't work right is the hurd + console :/ + so we might need to not enable it by default + braunr: you mean the mode setting? + youpi: i don't know what's wrong with the hurd console, but it + seems to deadlock with pthreads + ah? + I don't have such issue + ah ? i need to retest that then + +Same issue as [[term_blocking]] perhaps? + + +## IRC, freenode, #hurd, 2013-01-06 + + it seems fakeroot has become slow as hell + fakeroot is the main source of dead name notifications + well, a very heavy one + with pthreads hurd servers, their priority is raised, precisely to + give them time to handle those dead name notifications + which slows everything else down, but strongly reduces the rate at + which additional threads are created to handle dn notifications + so this is expected + ok :/ + which is why i mentioned a rewrite of io_select into a completely + synchronous io_poll + so that the client themselves remove their requests, instead of + the servers doing it asynchronously when notified + by "slows everything else down", you mean, if the servers do take + cpu time? + but considering the amount of messaging it requires, it will be + slow on moderate to large fd sets with frequent calls (non blocking or + low timeout) + yes + well here the problem is not really it gets slowed down + but that e.g. for gtk+2.0 build, it took 5h cpu time + (and counting) + ah, the hurd with pthreads is noticeably slower too + i'm not sure why, but i suspect the amount of internal function + calls could account for some of the overhead + I mean the fakeroot process + not the server process + hum + that's not normal :) + that's what I meant + well, i should try to build gtk+20 some day + i've been building glibc today and it's going fine for now + it's the install stage which poses problem + I've noticed it with the hurd package too + the hurd is easier to build + that's a good test case + there are many times when fakeroot just doesn't use cpu, and it + doesn't look like a select timeout issue (it still behaved that way with + my fixed branch) + in general, pfinet is taking really a lot of cpu time + that's surprising + why ? + fakeroot uses it a lot + I know + but still + 40% cpu time is not normal + I don't see why it would need so much cpu time + 17:57 < braunr> but considering the amount of messaging it + requires, it will be slow on moderate to large fd sets with frequent + calls (non blocking or low timeout) + by "it", what did you mean? + I thought you meant the synchronous select implementation + something irrelevant here + yes + what matters here is the second part of my sentence, which is what + i think happens now + you mean it's the IPC overhead which is taking so much time? + i mean, it doesn't matter if io_select synchronously removes + requests, or does it by destroying ports and relying on notifications, + there are lots of messages in this case anyway + yes + why "a lot" ? + more than one per select call? + yes + why ? + one per fd + then one to wait + there are two in faked + hum :) + i remember the timeout is low + but i don't remember its value + the timeout is NULL in faked + the client then + the client doesn't use select + i must be confused + i thought it did through the fakeroot library + but yes, i see the same behaviour, 30 times more cpu for pfinet + than faked-tcp + or let's say between 10 to 30 + and during my tests, these were the moments the kernel would + create lots of threads in servers and fail because of lack of memory, + either kernel memory, or virtual in the client space (filled with thread + stacks) + it could be due to threads spinning too much + (inside pfinet) + attaching a gdb shows it mostly inside __pthread_block + uh, how awful pfinet's select is + a big global lock + whenever something happens all threads get woken up + BKL! + * pinotree runs + we have many big hurd locks :p + it's rather a big translator lock + more than a global lock it seems, a global condvar too, isn't it ? + sure + we have a similar problem with the hurd-specific cancellation + code, it's in my todo list with io_select + ah, no, the condvar is not global diff --git a/open_issues/locking_issues.mdwn b/open_issues/locking_issues.mdwn index e15562bc..8008e5a1 100644 --- a/open_issues/locking_issues.mdwn +++ b/open_issues/locking_issues.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2011 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2011, 2012 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -32,3 +32,16 @@ the behavior of the locking logic. There are tools for formal verification/[[code_analysis]] that can likely help here. There is a [[!FF_project 278]][[!tag bounty]] on this task. + + +# IRC, fOFTC, #debian-hurd, 2012-12-15 + + youpi: can you think of a locking error recently fixed in the + translators ? I'd like to try a Coccinelle script on a real-world example + 0b6286a3c5eb86e3cca72d0840fc009855e4fba5 for instance + or a60414ee7fdabb2bdfb17fe82b9a09f811bd2de0 + or b8082aab5049f753abd720a5ef6a113e2acef911 + thx, I think I might have caught a few double unlocks, I'll send + patches/bug reports this week-end + oh, good :) + Steap: Great -- looking forward to that! diff --git a/open_issues/multithreading.mdwn b/open_issues/multithreading.mdwn index f42601b4..f631a80b 100644 --- a/open_issues/multithreading.mdwn +++ b/open_issues/multithreading.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2010, 2011, 2012 Free Software Foundation, +[[!meta copyright="Copyright © 2010, 2011, 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable @@ -11,7 +11,8 @@ License|/fdl]]."]]"""]] [[!tag open_issue_hurd]] -Hurd servers / VFS libraries are multithreaded. +Hurd servers / VFS libraries are multithreaded. They can even be said to be +"hyperthreaded". # Implementation @@ -22,9 +23,71 @@ Hurd servers / VFS libraries are multithreaded. * [[hurd/libpthread]] +## IRC, freenode, #hurd, 2011-04-20 + + so basically, a thread should consume only a few kernel resources + in GNU Mach, it doesn't even consume a kernel stack because only + continuations are used + +[[microkernel/mach/gnumach/continuation]]. + + and in userspace, it consumes 2 MiB of virtual memory, a few table + entries, and almost no CPU time + What does "hyperthreaded" mean: Do you have a reference? + in this context, it just means there are a lot of threads + even back in the 90s, the expected number of threads could scale + up to the thousand + today, it isn't much impressive any more + but at the time, most systems didn't have LWPs yet + and a process was very expensive + Looks like I have some catching up to do: What is "continuations" + and LWP? Maybe I also need a reference to an overview on multi-threading. + Lightweight process? + http://en.wikipedia.org/wiki/Light-weight_process + LWPs are another names for kernel threads usually + most current kernels support kernel preemption though + +[[microkernel/mach/gnumach/preemption]]. + + which means their state is saved based on scheduler decisions + unlike continuations where the thread voluntarily saves its state + if you only have continuations, you can't have kernel preemption, + but you end up with one kernel stack per processor + while the other model allows kernel preemption and requires one + kernel stack per thread + I know resources are limited, but it looks like kernel preemption + would be nice to have. Is that too much for a GSoC student? + it would require a lot of changes in obscure and sensitive parts + of the kernel + and no, kernel preemption is something we don't actually need + even current debian linux kernels are built without kernel + preemption + and considering mach has hard limitations on its physical memory + management, increasing the amount of memory used for kernel stacks would + imply less available memory for the rest of the system + Are these hard limits in mach difficult to change? + yes + consider mach difficult to change + that's actually one of the goals of my stalled project + which I hope to resume by the end of the year :/ + Reading Wikipedia it looks like LWP are "kernel treads" and other + threads are "user threads" at least in IBM/AIX. LWP in Linux is a thread + sharing resources and in SunOS they are "user threads". Which is closest + for Hurd? + i told you + 14:09 < braunr> LWPs are another names for kernel threads usually + Similar to to the IBM definition then? Sorry for not remembering + what I've been reading. + # Design +## Application Programs + +### [[glibc/signal/signal_thread]] + +## Hurd Servers + See [[hurd/libports]]: roughly using one thread per incoming request. This is not the best approach: it doesn't really make sense to scale the number of worker threads with the number of incoming requests, but @@ -37,7 +100,7 @@ Control*](http://soft.vub.ac.be/~tvcutsem/talks/presentations/T37_nobackground.p Tom Van Cutsem, 2009. -## IRC, freenode, #hurd, 2012-07-08 +### IRC, freenode, #hurd, 2012-07-08 braunr: about limiting number of threads, IIRC the problem is that for some threads, completing their work means triggering some action in @@ -49,7 +112,7 @@ Tom Van Cutsem, 2009. right -## IRC, freenode, #hurd, 2012-07-16 +### IRC, freenode, #hurd, 2012-07-16 hm interesting when many threads are creating to handle requests, they @@ -134,7 +197,7 @@ Tom Van Cutsem, 2009. (i still strongly believe those shouldn't be used at all) -## IRC, freenode, #hurd, 2012-08-31 +### IRC, freenode, #hurd, 2012-08-31 and the hurd is all but scalable I thought scalability was built-in already, at least for hurd?? @@ -157,7 +220,7 @@ Tom Van Cutsem, 2009. a very common mistake of the early 90s -## IRC, freenode, #hurd, 2012-09-06 +### IRC, freenode, #hurd, 2012-09-06 mel-: the problem with such a true client/server architecture is that the scheduling context of clients is not transferred to servers @@ -203,7 +266,7 @@ Tom Van Cutsem, 2009. async by nature, will create messages floods anyway -# Alternative approaches: +## Alternative approaches: * diff --git a/open_issues/multithreading/erlang-style_parallelism.mdwn b/open_issues/multithreading/erlang-style_parallelism.mdwn index 75539848..4c3651e3 100644 --- a/open_issues/multithreading/erlang-style_parallelism.mdwn +++ b/open_issues/multithreading/erlang-style_parallelism.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2010 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2010, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -148,6 +148,9 @@ IRC, #hurd, 2010-10-05 they block. but if we want to accept that, there is no point in doing this continuation stuff at all -- we could just use a single-threaded implementation :-) + +[[continuation]]. + Hard solution: do use explicit I/O and invent a read_no_pagefault() call. not sure what you mean exactly. what I would consider is something diff --git a/open_issues/nice_vs_mach_thread_priorities.mdwn b/open_issues/nice_vs_mach_thread_priorities.mdwn index 6a890eca..76788a53 100644 --- a/open_issues/nice_vs_mach_thread_priorities.mdwn +++ b/open_issues/nice_vs_mach_thread_priorities.mdwn @@ -1,4 +1,5 @@ -[[!meta copyright="Copyright © 2010 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2010, 2012, 2013 Free Software Foundation, +Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -16,74 +17,137 @@ when testing *nice*: [[!debbug 190581]]. There has been older discussion about this, too, but this is not yet captured here. -IRC, #hurd, August 2010 + +# IRC, freenode, #hurd, 2010-08 I'm reading Mach and POSIX documentation to understand the priorities/nice problems - antrik said it would be better to reimplement everything instead of fixing the current Mach interfaces, though I'm not sure about that yet + antrik said it would be better to reimplement everything instead of + fixing the current Mach interfaces, though I'm not sure about that yet uh, so he changed his mind? - it seems POSIX doesn't say nice values should be -20..20, but 0..(2*NZERO - 1) - he said we could just change the max priority value and be done with it :) - so we can probably define NZERO to 16 to match the Mach range of 0..31 + it seems POSIX doesn't say nice values should be -20..20, but + 0..(2*NZERO - 1) + he said we could just change the max priority value and be done + with it :) + so we can probably define NZERO to 16 to match the Mach range of + 0..31 s/said/had said previously/ - youpi: POSIX is actually fucked up regarding the definition of nice values + youpi: POSIX is actually fucked up regarding the definition of + nice values or at least the version I checked was - antrik: why? this says the range is [0,{NZERO}*2-1], so we can just set NZERO to 16 AFAICS: http://www.opengroup.org/onlinepubs/9699919799/functions/getpriority.html - it talkes about NZERO and all; making it *look* like this could be defined arbitrarily... but in other places, it's clear that the standard 40 level range is always assumed - anyways, I totally see no point in deviating from other systems in this regard. it can only cause problems, and gives us no benefits + antrik: why? this says the range is [0,{NZERO}*2-1], so we can just + set NZERO to 16 AFAICS: + http://www.opengroup.org/onlinepubs/9699919799/functions/getpriority.html + it talkes about NZERO and all; making it *look* like this could be + defined arbitrarily... but in other places, it's clear that the standard + 40 level range is always assumed + anyways, I totally see no point in deviating from other systems in + this regard. it can only cause problems, and gives us no benefits it says NZERO should be at least 20 iirc agreed - I don't remember the details; it's been a while since I looked at this - youpi: changing the number of levels is only part of the issue. I'm not sure why I didn't mention it initially when we discussed this - youpi: I already concluded years ago that it's not possible to implement nice levels correctly with the current Mach interfaces in a sane fashion - (it's probably possible, but only with a stupid hack like setting all the thread priorities one by one) - youpi: also, last time we discussed this, I checked how the nice stuff works currently on Hurd; and concluded that it's so utterly broken, that there is no point in trying to preserve *any* compatibility. I think we can safely throw away any handling that is alread there, and do it over from scratch in the most straightforward fashion - antrik: I've thought about setting NZERO to 16 and doing exactly what you've just said to be a hack (setting all the thread priorities one by one) + I don't remember the details; it's been a while since I looked at + this + youpi: changing the number of levels is only part of the + issue. I'm not sure why I didn't mention it initially when we discussed + this + youpi: I already concluded years ago that it's not possible to + implement nice levels correctly with the current Mach interfaces in a + sane fashion + (it's probably possible, but only with a stupid hack like setting + all the thread priorities one by one) + youpi: also, last time we discussed this, I checked how the nice + stuff works currently on Hurd; and concluded that it's so utterly broken, + that there is no point in trying to preserve *any* compatibility. I think + we can safely throw away any handling that is alread there, and do it + over from scratch in the most straightforward fashion + antrik: I've thought about setting NZERO to 16 and doing exactly + what you've just said to be a hack (setting all the thread priorities one + by one) but there seems to be consensus that that's undesirable... indeed, POSIX says NZERO should be at least 20 - pochu: BTW, I forgot to say: I'm not sure you appreciate the complexity of setting the thread max priorities individually - antrik: I don't. would it be too complex? I imagined it would be a simple loop :) - pochu: in order to prevent race conditions, you have to stop all other threads before obtaining the list of threads, and continue them after setting the priority for each - I don't even know whether it can be done without interfering with other thread handling... in which case it gets really really ugly - antrik: btw I'm looking at [gnumach]/kern/thread.[ch], removing the priority stuff as appropriate, and will change the tasks code later - it seems to me that using a more suitable kernel interface will not only be more elegant, but quite possibly actually easier to implement... - antrik: apparently it's not that hard to change the priority for all threads in a task, see task_priority() in gnumach/kern/task.c - it looks like the nice test failures are mostly because of the not 1:1 mapping between nice values and Mach priorities + pochu: BTW, I forgot to say: I'm not sure you appreciate the + complexity of setting the thread max priorities individually + antrik: I don't. would it be too complex? I imagined it would be a + simple loop :) + pochu: in order to prevent race conditions, you have to stop all + other threads before obtaining the list of threads, and continue them + after setting the priority for each + I don't even know whether it can be done without interfering with + other thread handling... in which case it gets really really ugly + antrik: btw I'm looking at [gnumach]/kern/thread.[ch], removing the + priority stuff as appropriate, and will change the tasks code later + it seems to me that using a more suitable kernel interface will + not only be more elegant, but quite possibly actually easier to + implement... + antrik: apparently it's not that hard to change the priority for + all threads in a task, see task_priority() in gnumach/kern/task.c + it looks like the nice test failures are mostly because of the not + 1:1 mapping between nice values and Mach priorities "Set priority of task; used only for newly created threads." there is a reason I didn't fix nice 8 years ago ah there is a change_threads option - marcusb: I'm not sure that comment is correct. that syscall is used by setpriority() + marcusb: I'm not sure that comment is correct. that syscall is used + by setpriority() yeah - I didn't read further, where it explains the change_threads options + I didn't read further, where it explains the change_threads + options I was shooting before asking questions :) - pochu: although there are some bad interactions if max_priorities are set per thread - pochu: maybe we are talking past each other. my point was not that it's hard to do in the kernel. I was just saying that it would be painful to do from userspace with the current kernel interface - antrik: you could still use that interface in user space, couldn't you? or maybe I'm misunderstanding... - cfhammar, antrik: current patch: http://emilio.pozuelo.org/~deb/gnumach.patch, main issue is probably what to do with high-priority threads. are there cases where there should be a thread with a high priority but the task's priority shouldn't be high? e.g. what to do with kernel_thread() in [gnumach]/kern/thread.c - i.e. if tasks have a max_priority, then threads shouldn't have a higher priority, but then either we raise the task's max_priority if we need a high-prio thread, or we treat them specially (e.g. new field in struct thread), or maybe it's a non-issue because in such cases, all the task is high-prio? - also I wonder whether I can kill the processor set's max_priority. It seems totally unused (I've checked gnumach, hurd and glibc) + pochu: although there are some bad interactions if max_priorities + are set per thread + pochu: maybe we are talking past each other. my point was not that + it's hard to do in the kernel. I was just saying that it would be painful + to do from userspace with the current kernel interface + antrik: you could still use that interface in user space, couldn't + you? or maybe I'm misunderstanding... + cfhammar, antrik: current patch: + http://emilio.pozuelo.org/~deb/gnumach.patch, main issue is probably what + to do with high-priority threads. are there cases where there should be a + thread with a high priority but the task's priority shouldn't be high? + e.g. what to do with kernel_thread() in [gnumach]/kern/thread.c + i.e. if tasks have a max_priority, then threads shouldn't have a + higher priority, but then either we raise the task's max_priority if we + need a high-prio thread, or we treat them specially (e.g. new field in + struct thread), or maybe it's a non-issue because in such cases, all the + task is high-prio? + also I wonder whether I can kill the processor set's + max_priority. It seems totally unused (I've checked gnumach, hurd and + glibc) (that would simplify the priority handling) - pochu: btw what does your patch do? i can't remember what was decided - cfhammar: it moves the max_priority from the thread to the task, so raising/lowering it has effect on all of its threads - it also increases the number of run queues (and thus that of priority levels) from 32 to 40 so we can have a 1:1 mapping with nice values - cfhammar: btw don't do a full review yet, just a quick look would be fine for now + pochu: btw what does your patch do? i can't remember what was + decided + cfhammar: it moves the max_priority from the thread to the task, so + raising/lowering it has effect on all of its threads + it also increases the number of run queues (and thus that of + priority levels) from 32 to 40 so we can have a 1:1 mapping with nice + values + cfhammar: btw don't do a full review yet, just a quick look would + be fine for now why not do priorities from 0 to 159 then both ranges can be scaled without loss of precision - neal: there would be from Mach to nice priorities, e.g. a task with a priority of 2 another with 3 would have the same niceness, though their priority isn't really the same + neal: there would be from Mach to nice priorities, e.g. a task with + a priority of 2 another with 3 would have the same niceness, though their + priority isn't really the same pochu: sure - pochu: but any posix priority would map to a current mach priority and back + pochu: but any posix priority would map to a current mach priority + and back sorry, that's not true a posix priority would map to a new mach priority and bach - and a current mach priority would map to a new mach priority and back + and a current mach priority would map to a new mach priority and + back which is I think more desirable than changing to 40 priority levels - neal> and a current mach priority would map to a new mach priority and back <- why should we care about this? + neal> and a current mach priority would map to a new mach priority + and back <- why should we care about this? to be compatible with existing mach code why gratutiously break existing interfaces? - they would break anyway, wouldn't them? i.e. if you do task_set_priority(..., 20), you can't know if the caller is assuming old or new priorities (to leave it as 20 or as 100) + they would break anyway, wouldn't them? i.e. if you do + task_set_priority(..., 20), you can't know if the caller is assuming old + or new priorities (to leave it as 20 or as 100) you add a new interface - you should avoid changing the semantics of existing interfaces as much as possible + you should avoid changing the semantics of existing interfaces as + much as possible ok, and deprecate the old ones I guess - following that rule, priorities only break if someone does task_set_priority_new(..., X) and task_get_priority () + following that rule, priorities only break if someone does + task_set_priority_new(..., X) and task_get_priority () there are other users of Mach I'd add a configure check for the new interface alternatively, you can check at run time @@ -96,102 +160,216 @@ IRC, #hurd, August 2010 even apple didn't gratuitously break Mach in fact, it may make sense to see how apple handles this problem hmm, I hadn't thought about that - the other thing I don't understand is: "I'd add a configure check for the new interface". a configure check where? in Mach's configure? that doesn't make sense to me + the other thing I don't understand is: "I'd add a configure check + for the new interface". a configure check where? in Mach's configure? + that doesn't make sense to me any users of the interface ok so in clients, e.g. glibc & hurd yes. - neal: I'm not sure we are winning anything by keeping compatibility with other users of Mach... - neal: we *know* that to make Hurd work really well, we have to do major changes sooner or later. we can just as well start now IMHO - keeping compatibility just seems like extra effort without any benefit for us + neal: I'm not sure we are winning anything by keeping + compatibility with other users of Mach... + neal: we *know* that to make Hurd work really well, we have to do + major changes sooner or later. we can just as well start now IMHO + keeping compatibility just seems like extra effort without any + benefit for us just OOC have all other Mach forks, preserved full compatibility? guillem: Darwin is pretty compatible, as I understand it - pochu: the fundamental approach of changing the task_priority interface to serve as a max priority, and to drop the notion of max priorities from threads, looks fine + pochu: the fundamental approach of changing the task_priority + interface to serve as a max priority, and to drop the notion of max + priorities from threads, looks fine pochu: I'm not sure about the thread priority handling - I don't know how thread priorities are supposed to work in chreads and/or pthread - I can only *guess* that they assume a two-stage scheduling process, where the kernel first decides what process to run; and only later which thread in a process... - if that's indeed the case, I don't think it's even possible to implement with the current Mach scheduler - I guess we could work with relative thread priorities if we really want: always have the highest-priority thread run with the task's max priority, and lower the priorities of the other threads accordingly - however, before engaging into this, I think you should better check whether any of the code in Hurd or glibc actually uses thread priorities at all. my guess is that it doesn't - I think we could get away with stubbing out thread priority handling alltogether for now, and just use the task priority for all threads - I agree BTW that it would be useful to check how Darwin handles this - btw do you know where to download the OS X kernel source? I found something called xnu, but I?m not sure that's it + I don't know how thread priorities are supposed to work in chreads + and/or pthread + I can only *guess* that they assume a two-stage scheduling + process, where the kernel first decides what process to run; and only + later which thread in a process... + if that's indeed the case, I don't think it's even possible to + implement with the current Mach scheduler + I guess we could work with relative thread priorities if we really + want: always have the highest-priority thread run with the task's max + priority, and lower the priorities of the other threads accordingly + however, before engaging into this, I think you should better + check whether any of the code in Hurd or glibc actually uses thread + priorities at all. my guess is that it doesn't + I think we could get away with stubbing out thread priority + handling alltogether for now, and just use the task priority for all + threads + I agree BTW that it would be useful to check how Darwin handles + this + btw do you know where to download the OS X kernel source? I found + something called xnu, but I?m not sure that's it pochu: yeah, that's it Darwin is the UNIX core of OS X, and Xnu is the actual kernel... hmm, so they have both a task.priority and a task.max_priority pochu: thoughts? - neal: they have a priority and a max_priority in the task and in the threads, new threads inherit it from its parent task - then they have a task_priority(task, priority, max_priority) that can change a task's priorities, and it also changes it for all its threads + neal: they have a priority and a max_priority in the task and in + the threads, new threads inherit it from its parent task + then they have a task_priority(task, priority, max_priority) that + can change a task's priorities, and it also changes it for all its + threads how does the global run queue work? - and they have 128 run queues, no idea if there's a special reason for that number + and they have 128 run queues, no idea if there's a special reason + for that number neal: sorry, what do you mean? I don't understand the point of the max_priority parameter neal: and I don't understand the point of the (base) priority ;) - the max_priority is just that, the maximum priority of a thread, which can be lowered, but can't exceed the max one - the (base) priority, I don't understand what it does, though I haven't looked too hard. maybe it's the one a thread starts at, and must be <= max_priority - pochu: it's clearly documented in the manual, as well as in the code your initial patch changes... + the max_priority is just that, the maximum priority of a thread, + which can be lowered, but can't exceed the max one + the (base) priority, I don't understand what it does, though I + haven't looked too hard. maybe it's the one a thread starts at, and must + be <= max_priority + pochu: it's clearly documented in the manual, as well as in the + code your initial patch changes... or do you mean the meaning is different in Darwin?... I was speaking of Darwin, though maybe it's the same as you say - I would assume it's the same. I don't think there would be any point in having the base vs. max priority distinction at all, except to stay in line with standard Mach... - at least I can't see a point in the base priority semantics for use in POSIX systems... - right, it would make sense to always have priority == max_priority ... - neal: so max_priority is that maximum priority, and priority is the one used to calculate the scheduled priority, and can be raised and lowered by the user without giving special permissions as long as he doesn't raise it above max_priority - well this would allow a user to lower a process' priority, and raise it again later, though that may not be allowed by POSIX, so then we would want to have max_priority == priority (or get rid of one of them if possible and backwards compatible) + I would assume it's the same. I don't think there would be any + point in having the base vs. max priority distinction at all, except to + stay in line with standard Mach... + at least I can't see a point in the base priority semantics for + use in POSIX systems... + right, it would make sense to always have priority == max_priority + ... + neal: so max_priority is that maximum priority, and priority is the + one used to calculate the scheduled priority, and can be raised and + lowered by the user without giving special permissions as long as he + doesn't raise it above max_priority + well this would allow a user to lower a process' priority, and + raise it again later, though that may not be allowed by POSIX, so then we + would want to have max_priority == priority (or get rid of one of them if + possible and backwards compatible) pochu: right, that's what I think too - BTW, did I bring up handling of thread priorities? I know that I meant to, but I don't remember whether I actually did... + BTW, did I bring up handling of thread priorities? I know that I + meant to, but I don't remember whether I actually did... antrik: you told me it'd be ok to just get rid of them for now - so I'm more thinking of fixing max_priority and (base) priority and leaving thread's scheduling priority as it currently is + so I'm more thinking of fixing max_priority and (base) priority and + leaving thread's scheduling priority as it currently is s/so/though/ - pochu: well, my fear is that keeping the thread priority handling as ist while changing task priority handling would complicate the changes, while giving us no real benefit... - though looking at what Darwin did there should give you an idea what it involves exactly... - antrik: what would you propose, keeping sched_priority == max_priority ? + pochu: well, my fear is that keeping the thread priority handling + as ist while changing task priority handling would complicate the + changes, while giving us no real benefit... + though looking at what Darwin did there should give you an idea + what it involves exactly... + antrik: what would you propose, keeping sched_priority == + max_priority ? s/keeping/making/ yes, if that means what I think it does ;-) - and keeping the priority of all threads equal to the task priority for now - of course this only makes sense if changing it like this is actually simpler than extending the current handling... - again, I can't judge this without actually knowing the code in question. looking at Darwin should give you an idea... - I think leaving it as is, making it work with the task's max_priority changes would be easier - perhaps I'm totally overestimating the amount of changes required to do what Darwin does - OTOH, carrying around dead code isn't exactly helping the maintainability and efficiency of gnumach... + and keeping the priority of all threads equal to the task priority + for now + of course this only makes sense if changing it like this is + actually simpler than extending the current handling... + again, I can't judge this without actually knowing the code in + question. looking at Darwin should give you an idea... + I think leaving it as is, making it work with the task's + max_priority changes would be easier + perhaps I'm totally overestimating the amount of changes required + to do what Darwin does + OTOH, carrying around dead code isn't exactly helping the + maintainability and efficiency of gnumach... so I'm a bit ambivalent on this - should we go for minimal changes here, or use this occasion to simplify things?... + should we go for minimal changes here, or use this occasion to + simplify things?... I guess it would be good to bring this up on the ML in the context of gsoc i'd say minimal changes - there's also neal's point on keeping backwards compatibility as much as possible + there's also neal's point on keeping backwards compatibility as + much as possible my point was not backwards compatibility at all costs I'm still not convinced this is a valid point :-) but to not gratutiously break things - neal: well, I never suggested breaking things just because we can... I only suggested breaking things to make the code and interface simpler :-) + neal: well, I never suggested breaking things just because we + can... I only suggested breaking things to make the code and interface + simpler :-) I do not insist on it though at that time, we did not know how Mac did it - I only think it would be good to get into a habit that Mach interfaces are not sacred... - and, I also had a proposal, which I think is not difficult to implement given the existing patch - but as I said, I do not feel strongly about this. if people feel more confident about a minimal change, I'm fine with that :-) - neal: err... IIRC your proposal was only about the number of nice levels? we are discussing the interface change necessary to implement POSIX semantics properly + I only think it would be good to get into a habit that Mach + interfaces are not sacred... + and, I also had a proposal, which I think is not difficult to + implement given the existing patch + but as I said, I do not feel strongly about this. if people feel + more confident about a minimal change, I'm fine with that :-) + neal: err... IIRC your proposal was only about the number of nice + levels? we are discussing the interface change necessary to implement + POSIX semantics properly or am I misremembering? - antrik: he argues that with that number of nice levels, we could keep backwards compatibility for the 0..31 levels, and for 0..39 for POSIX compatibility + antrik: he argues that with that number of nice levels, we could + keep backwards compatibility for the 0..31 levels, and for 0..39 for + POSIX compatibility pochu: yes, I remember that part - antrik : My suggestion was: raise the number of nice levels to 160 and introduce a new interface which uses those. Adjust the old interface to space by 160/32 - neal: I think I said it before: the problem is not *only* in the number of priority levels. the semantics are also wrong. which is why Darwin added a max_priority for tasks + antrik : My suggestion was: raise the number of nice levels to 160 + and introduce a new interface which uses those. Adjust the old interface + to space by 160/32 + neal: I think I said it before: the problem is not *only* in the + number of priority levels. the semantics are also wrong. which is why + Darwin added a max_priority for tasks what do you mean the semantics are wrong? I apologize if you already explained this. - hm... I explained it at some point, but I guess you were not present at that conversation + hm... I explained it at some point, but I guess you were not + present at that conversation I got disconnected recently so I likely don't have it in backlog. - in POSIX, any process can lower its priority; while only privileged processes can raise it - Mach distinguishes between "current" and "max" priority for threads: "max" behaves like POSIX; while "current" can be raised or lowered at will, as long as it stays below "max" + in POSIX, any process can lower its priority; while only + privileged processes can raise it + Mach distinguishes between "current" and "max" priority for + threads: "max" behaves like POSIX; while "current" can be raised or + lowered at will, as long as it stays below "max" for tasks, there is only a "current" priority - (which applies to newly created threads, and optionally can be set for all current threads while changing the task priority) - glibc currently uses the existing task priorities, which leads to *completely* broken semantics - instead, we need something like a max task priority -- which is exactly what Darwin added + (which applies to newly created threads, and optionally can be set + for all current threads while changing the task priority) + glibc currently uses the existing task priorities, which leads to + *completely* broken semantics + instead, we need something like a max task priority -- which is + exactly what Darwin added yes - (the "current" task priority is useless for POSIX semantics as far as I can tell; and regarding thread priorities, I doubt we actually use them at all?...) + (the "current" task priority is useless for POSIX semantics as far + as I can tell; and regarding thread priorities, I doubt we actually use + them at all?...) where does a new thread get its initial max_priority from? cfhammar: from the creator thread IIRC yes -2010-08-12 - my plan is to change the number of priority levels and the threads/tasks priority handling, then add new RPCs to play with them and make the old ones stay compatible, then make glibc use the new RPCs +## IRC, freenode, #hurd, 2010-08-12 + + my plan is to change the number of priority levels and the + threads/tasks priority handling, then add new RPCs to play with them and + make the old ones stay compatible, then make glibc use the new RPCs + + +# IRC, freenode, #hurd, 2012-12-29 + + and, for a reason that i can't understand, there are less + priorities than nice levels, despite the fact mach was designed to run + unix systems on top of it .. + btw, didn't we have a plan to increase that number? + i have no idea + but we should :) + I remember some discussion about it on the list + + +## IRC, freenode, #hurd, 2012-12-31 + + braunr: btw, we *do* have fixed the nice granularity + +#define MACH_PRIORITY_TO_NICE(prio) ((prio) - 20) + in the debian package at least + ah, no + it's not applied yet + so I have the patch under hand, just not applied :) + but that's a simple shift + the real problem is that there aren't as many mach priorities as + there are nice levels + that's not really a problem + we can raise that in the kernel + the problem is the change from shifted to unshifted + that brings odd nice values during the upgrade + ok + i hope the scheduler code isn't allergic to more priorities :) + ---- +## IRC, freenode, #hurd, 2013-01-02 -Another nice issue: [[nice_changes_priority_of_parent_shell]]. + pochu: i see you were working on nice levels and scheduling code + some time ago + pochu: anything new since then ? + braunr: nope + pochu: were you preparing it for the gsoc ? + braunr: can't remember right now, either that or to fix a ftbfs in + debian + iirc it's coreutils which wants proper nice levels diff --git a/open_issues/open_posix_test_suite.mdwn b/open_issues/open_posix_test_suite.mdwn index 089ea1b1..5afa6538 100644 --- a/open_issues/open_posix_test_suite.mdwn +++ b/open_issues/open_posix_test_suite.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2009 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2009, 2012 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -10,6 +10,9 @@ License|/fdl]]."]]"""]] [[!meta title="Open POSIX Test Suite"]] + +# 2009-07-27 + Here's a log of a [Open POSIX Test Suite](http://posixtest.sourceforge.net/) run (get sources, `make`, inspect `logfile`); this is from 2009-07-27 HEAD sources on a 2009-07-27 Debian GNU/Hurd system. @@ -2713,3 +2716,10 @@ and restart: unexpected error: scheduler 5-4: pthread_attr_setschedpolicy functional/threads/schedule/1-2: execution: UNRESOLVED: Output: unexpected error: scheduler 5-5: pthread_setschedparam + + +# IRC, OFTC, #debin-hurd, 2012-12-28 + + [...] saw posixtestsuite being completed too \o/ + yep :) + (still has a number of failures, but at least can be fully run) diff --git a/open_issues/rework_gnumach_ipc_spaces.mdwn b/open_issues/rework_gnumach_ipc_spaces.mdwn index 7c66776b..20ae126d 100644 --- a/open_issues/rework_gnumach_ipc_spaces.mdwn +++ b/open_issues/rework_gnumach_ipc_spaces.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2011 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2011, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -433,6 +433,8 @@ There is a [[!FF_project 268]][[!tag bounty]] on this task. no locking, no preloading before locking, all of this because simple locks don't exist on UP, and because the kernel isn't preemptible +[[microkernel/mach/gnumach/preemption]]. + antrik: and yes, min number is 0, but in that case you don't need (space, port) -> right lookups :) antrik: or put in another way, whichever reasonable structure you @@ -568,6 +570,9 @@ There is a [[!FF_project 268]][[!tag bounty]] on this task. < braunr> and ipc spaces are locked when inserting/allocating names < braunr> we normally don't need preloading in gnumach < braunr> since there is no preemption nor SMP + +[[microkernel/mach/gnumach/preemption]]. + < braunr> but in case someone changes that, i'd like the code to be mostly ready < braunr> and correctly handle those ugly simple locks diff --git a/open_issues/rpc_stub_generator.mdwn b/open_issues/rpc_stub_generator.mdwn new file mode 100644 index 00000000..05eb53b8 --- /dev/null +++ b/open_issues/rpc_stub_generator.mdwn @@ -0,0 +1,99 @@ +[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag open_issue_mig]] + + +# Originally in context of [[user/jkoenig/java]] + + * [[tschwinge]] has to read about RMI and CORBA. + + * MIG + + * Hacking [[microkernel/mach/MIG]] shouldn't be too difficult. + + * (Unless you want to make MIG's own code (that is, not the generated + code, but MIG itself) look a bit more nice, too.) ;-) + + * There are also alternatives to MIG. If there is interest, the following + could be considered: + + * FLICK ([[!GNU_Savannah_task 5723]]). [[tschwinge]] has no idea yet if + there would be any benefits over MIG, like better modularity (for the + backends)? If we feel like it, we could spend a little bit of time on + this. + + * For [[microkernel/Viengoos]], Neal has written a RPC stub generator + entirely in C Preprocessor macros. While this is obviously not + directly applicable, perhaps we can get some ideas from it. + + * Anything else that would be worth having a look at? (What are other + microkernels using?) + + +# IRC, freenode, #hurd, 2012-12-27 + + i'll soon have userspace on x15, and begin system calls, and of + course IPC + and, since i personally have a strong disgust for IDLs, i was + thinking of manually writing the RPC "stubs", with helper functions and + macros + what do you think of that ? + IDLs could have the advantage you can generate any kind of + language output out of them + I'd not recommend that + as ugly as IDLs are, they are useful + maybe pick something with proper per-arch types and + structs... :) + youpi: what feature do you consider that important in an IDL ? + i mean important enough to want to keep it + argument matching between client and server code + well obviously, but system wide protocols such as the hurd's tend + not to change much + we've still seen bugs about that + even without changing the protocol + pinotree: i agree about the language thing, but wrapping libraries + also do + what IDL would you then recommend ? + corba! :p + * pinotree runs + well don't run + it's actually at the top of my list :p + the parser is free, and allows writing custom backends + and there is already support for many languages + * pinotree some time ago fixed omniorb in debian + (to compile on hurd, i mean) + i thought i could delay this problem some more but it's actually + coming quite fast :/ + i suppose it would make sense to use an already popular IDL so + that support for other languages is readily available + and/or people already know it + hm that's secondary imo + it's not that hard to learn an idl (providing it's simple, + i.e. not mig-like) + hm how about google protocol buffers ? + wow, not bad at a first glance (never seen it) + structs, optional fields, builtin strings + the nice thing about it is that it focuses on serialization most, + but has basic rpc support that allows using whatever communication + channel you want + it may still be overkill for a microkernel based system + otoh rpc is everything in a microkernel-based os + when i say overkill, i mean too slow + we still have 1024-sized string_t... + yes, mig is totally hairy ... + hum, c++ only, no c :/ + there seems to be a C compiler, install protobuf-c-compiler + v0.15, doesn't seem widely used + even on 0.14 (currently in debian) + it also seems to rely on contiguous messages, whereas i want + scatter-gather to be used with x15 + once more, i fell back on omg idl + oh, there is also flick that looks interesting diff --git a/open_issues/select.mdwn b/open_issues/select.mdwn index 778af530..391509a9 100644 --- a/open_issues/select.mdwn +++ b/open_issues/select.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2010, 2011, 2012 Free Software Foundation, +[[!meta copyright="Copyright © 2010, 2011, 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable @@ -1631,6 +1631,412 @@ IRC, unknown channel, unknown date: i'll try the non intrusive mode +## IRC, freenode, #hurd, 2012-12-11 + + braunr: What is the technical difference of having the delay at + io_select compared to mach_msg for one FD? + gnu_srs1: it's a slight optimization + instead of doing a send and a receive, the same mach_msg call is + used for both + (for L4 guys it wouldn't be considered a slight optimization :)) + + +## IRC, freenode, #hurd, 2012-12-17 + + tschwinge: + http://git.savannah.gnu.org/cgit/hurd/glibc.git/log/?h=rbraun/select_timeout_for_one_fd + gnu_srs: talking about that, can you explain : + "- The pure delay case is much faster now, making it necessary to + introduce a delay of 1 msec when the timeout parameter is set to + zero. + " + I meant poll with zero delay needs a delay to make sure the file + descriptors are ready. Testing it now. + for me, the "pure delay" case is the case where there is no file + descriptor + when the timeout is 0 is the non-blocking case + and yes, you need 1ms for the non-blocking case when there are + file descriptors + sorry bad wording (again) + (note however that this last "requirement" is very hurd specific, + and due to a design issue) + the work i did six months ago fixes it, but depends on pthreads + for correct performances (or rather, a thread library change, but + changing cthreads was both difficult and pointless) + also, i intend to work on io_poll as a replacement for io_select, + that fixes the "message storm" (i love these names) caused by dead-name + notifications resulting from the way io_select works + + +## IRC, freenode, #hurd, 2012-12-19 + + tschwinge: i've tested the glibc rbraun/select_timeout_for_one_fd + branch for a few days on darnassus now, and nothing wrong to report + + +## IRC, freenode, #hurd, 2012-12-20 + + braunr: so, shall I commit the single hurd select timeout fix to + the debian package? + youpi: i'd say so yes + + +## IRC, freenode, #hurd, 2013-01-03 + + gnu_srs: sorry, i don't understand your poll_timeout patch + it basically reverts mine for poll only + but why ? + braunr: It does not revert your select patch, if there is one FD + the timeout is at io_select, if not one the timeout is at mach_msg + but why does it only concern poll ? + (and why didn't i do it this way in the first place ?) + (or maybe i did ?) + there are problems with a timeout of zero for poll, depending on + the implementation the FDs can result in not being ready. + but that's also true with select + the cases I've tested only have problems for poll, not select + we'll have to create test cases for both + but your solution doesn't hold anyway + our current workaround for this class of problems is to set a + lower bound on the timeout to 1 + (which comes from a debian specific patch) + see the test code i sent, + http://lists.gnu.org/archive/html/bug-hurd/2012-12/msg00043.html, + test_poll+select.c + the patch might be incomplete though + i know, but your solution is still wrong + see debian/patches/hurd-i386/local-select.diff in the debian + eglibc package + and in that message I have introduced a minimum timeout for poll + of 1ms. + yes but you shouldn't + this is a *known* bug, and for now we have a distribution-specific + patch + in other words, we can't commit that crap upstream + well, according to youpi there is a need for a communication to + flag when the FDs are ready, not yet implemented. + i'm not sure what you mean by that + I don't understand what you refer to + there is a need for a full round-trip even in the non blocking + case + which is implemented in one of my hurd branches, but awaits + pthreads integration for decent scalability + the only difference between poll and select is that select can stop + the loop on error, while poll needs to continue + youpi: don't you think the glibc select patch is incomplete ? + incomplete in what direction? + the minimum 1ms delay is a completely bogus workaround + youpi: + http://lists.gnu.org/archive/html/bug-hurd/2012-11/msg00001.html + so I wouldn't say it's even completing anything :) + hm no never mind, it's not + i thought it missed some cases where the delay made sense, but no + the timeout can only be 0 if the timeout parameter is non NULL + gnu_srs: during your tests, do you run with the debian eglibc + package (including your changes), or from the git glibc ? + I run with -37, -38, with my minimum poll changes, my 3 cases, + and 3 case-poll updates. + so you do have the debian patches + so you normally have this 1ms hack + which means you shouldn't need to make the poll case special + A admit the 1ms patch is not possible to submit upstream, but it + makes things work (and youpi use it for vim) + i'll try to reproduce your ntpdate problem with -38 when i have + some time + uh, no, vim actually doesn't use the hack :p + gnu_srs: it's the contrary: we have to avoid it for vim + if (strcmp(program_invocation_short_name, "vi") && + strcmp(program_invocation_short_name, "vim") && + strcmp(program_invocation_short_name, "vimdiff") && !to) + to = 1; + that does what we are saying + strcmp returns 0 on equality + aha, OK then + I don't have that hack in my code. I have tested vim a little, + but cannot judge, since I'm not a vi user. + you don't ? + you should have it if the package patches were correctly applied + Maybe somebody else could compile a libc with the 3-split code to + test it out? + that's another issue + I mean the patch I sent to the list, there the vi{m} hack is not + present. + well obviously + but i'm asking about the poll_timeout one + A, OK, it's very easy to test that version too but currently -38 + maybe has a regression due to some other patch. + that's another thing we're interested in + Unfortunately it takes a _long_ time to build a new version of + libc (several hours...) + -38 is already built + yes, but removing patches one by one and rebuilding. + but then, the "regression" you mention concerns a package that + wasn't really working before + removing ? + ah, to identify the trouble carrying one + ntpdate works with -37, no problem... + but not with -38 + again, trace it with -38 + to see on what it blocks + as I wrote yesterday gdb hangs the box hard and rpctrace bugs + out, any ideas? + printf + gdb from a subhurd + I'm suspecting the setitimer patch: Without it gdb ntpdate does + not freeze hard any longer, bt full: http://paste.debian.net/221491/ + Program received signal SIGINT, Interrupt. + 0x010477cc in mach_msg_trap () + at /usr/src/kernels/eglibc/eglibc-2.13/build-tree/hurd-i386-libc/mach/mach_msg_trap.S:2 + 2 kernel_trap (__mach_msg_trap,-25,7) + (gdb) thread apply all bt full + + Thread 6 (Thread 3158.6): + #0 0x010477cc in mach_msg_trap () + at /usr/src/kernels/eglibc/eglibc-2.13/build-tree/hurd-i386-libc/mach/mach_msg_trap.S:2 + No locals. + #1 0x01047fc9 in __mach_msg (msg=0x52fd4, option=1282, send_size=0, + rcv_size=0, rcv_name=132, timeout=100, notify=0) at msg.c:110 + ret = + #2 0x010ec3a8 in timer_thread () at ../sysdeps/mach/hurd/setitimer.c:90 + err = + msg = {header = {msgh_bits = 4608, msgh_size = 32, + msgh_remote_port = 0, msgh_local_port = 132, msgh_seqno = 78, + msgh_id = 23100}, return_code = 17744699} + + setitimer.c:90 + err = __mach_msg (&msg.header, + MACH_RCV_MSG|MACH_RCV_TIMEOUT|MACH_RCV_INTERRUPT, + 0, 0, _hurd_itimer_port, + _hurd_itimerval.it_value.tv_sec * 1000 + + _hurd_itimerval.it_value.tv_usec / 1000, + MACH_PORT_NULL); + +[[alarm_setitimer]]. + + gdb ? + i thought ntpdate was the program freezing + the freeze is due to -38 + yes we know that + but why do you say "gdb ntpdate" instead of "ntpdate" ? + yes, ntpdate freezes: without gdb kill -9 is OK, with gdb it + freezes hard (with setitimer pacth). + we don't care much about the kill behaviour + ntpdate does indeed makes direct calls to setitimer + without the setitimer patch: without gdb ntpdate freezes (C-c is + OK), with gdb C-c gives the paste above + sorry i don't understand + *what* is the problem ? + there are two of them + ntpdate freezing + gdb freezing + ok + he's saying gdb freezing is due to the setitimer patch + yes that's what i understand now + what he said earlier made me think ntpdate was freezing with -38 + better: ntpdate hangs, gdb ntpdate freezes (with the setitimer + patch) + what's the behaviour in -37, and then what is the behaviour with + -38 ? + (of both actions, so your answer should give us four behaviours) + gnu_srs: what is the difference between "hangs" and "freezes" ? + -37 no problem, both with and without gdb. + you mean ntpdate doesn't freeze with -37, and does with -38 ? + hangs: kill -9 is sufficient, freezes: reboot, checking file + system etc + and i really mean ntpdate, not gdb whatever + the ntpdate hang (without the setitimer patch) in -38 can be due + to the poll stuff: Have to check further with my poll patch... + + +## IRC, freenode, #hurd, 2013-01-04 + + Summary of the eglibc-2.13-38 issues: without the + unsubmitted-setitimer_fix.diff patch and with + my poll_timeout.patch fix in + http://lists.gnu.org/archive/html/bug-hurd/2012-12/msg00042.html + ntpdate works again :) + please consider reworking the setitimer patch and add a poll case + in hurdselect.c:-D + Additional info: vim prefers to use select before poll,. With the + proposed changes (small,3-split), + only poll is affected by the 1ms default timeout, i.e. the + current vi hack is no longer needed. + gnu_srs: the setitimer patch looks fine, and has real grounds + gnu_srs: your poll_timeout doesn't + so unless you can explain where the problem comes from, we + shouldn't remove the setitimer patch and add yours + in addition + 09:30 < gnu_srs> only poll is affected by the 1ms default timeout, + i.e. the current vi hack is no longer needed. + that sentence is complete nonsense + poll and select are implemented using the same rpc, which means + they're both broken + if the vi hack isn't needed, it means you broke every poll user + btw, i think your ntpdate issue is very similar to the gitk one + gitk currently doesn't work because of select/poll + it does work fine with my hurd select branch though + which clearly shows a more thorough change is required, and your + hacks won't do any good (you may "fix" ntpdate, and break many other + things) + braunr: Why don't you try ntpdate yourself on -38 (none of my + patches applied) + you're missing the point + the real problem is the way select/poll is implemented, both at + client *and* server sides + 09:30 etc: The current implementation is slower than the 3-way + patch. Therefore it in not needed in the current implementation (I didn't + propose that either) + hacks at the client side only are pointless, whatever you do + slower ? + it's not about performance but correctness + your hack *can't* solve the select/poll correctness issue + yes, slower on my kvm boxes... + so it's normal that ntpdate and other applications such as gitk + are broken + if you try to fix it by playing with the timeout, you'll just + break the applications that were fixed in the past by playing with the + timeout another way + can you understand that ? + forget the timeout default, it's a side issue. + the *real* select/poll issue is that non blocking calls + (timeout=0) don't have the time to make a full round trip at the server + no it's not, it's the whole problem + some applications work with a higher timeout, some like gitk don't + ntpdate might act just the same + yes of course, and I have not addressed this problem either, I'm + mostly interested in the 3-way split. + well, it looks like you're trying to .. + to be able to submit my poll patches (not yet published) + i suggest you postpone these changes until the underlying + implementation works + i strongly suspect the split to be useless + we shouldn't need completely different paths just for this + conformance issue + so wait until select/poll is fixed, then test again + Read the POSIX stuff: poll and select are different. + i know + their expected behaviour is + that's what needs to be addressed + but you can't do that now, because there are other bugs in the way + so you'll have a hard time making sure your changes do fix your + issues, because the problems might be cause by the other problems + since you are the one who knows best, why don't you implement + everything yourself. + well, i did + and i'm just waiting for the pthreads hurd to spread before + adapting my select branch + +[[libpthread]]. + + it won't fix the conformance issue, but it will fix the underlying + implementation (the rpc) + and then you'll have reliable results for the tests you're + currently doing + why not even trying out the cases I found to have problems?? + because i now know why you're observing what you're observing + i don't need my eyes to see it to actually imagine it clerly + when i start gitk and it's hanging, i'm not thinking 'oh my, i + need to hack glibc select/poll !!!' + because i know the problem + i know what needs to be done, i know how to do it, it will be done + in time + please try to think the same way .. + you're fixing problems by pure guessing, without understanding + what's really happenning + (10:59:17 AM) braunr: your hack *can't* solve the select/poll + correctness issue: which hack? + "please consider removing setitimer because it blocks my ntpdate" + gnu_srs: all your select related patches + the poll_timeout, the 3-way split, they just can't + changes need to be made at the server side too + you *may* have fixed the conformance issue related to what is + returned, but since it get mixed with the underlying implementation + problems, your tests aren't reliable + well some of the test code is from gnulib, their code is not + reliable? + their results aren't + why is that so hard to understand for you ? + (11:08:05 AM) braunr: "please consider removing setitimer because + it blocks my ntpdate": It's not my ntpdate, it's a program that fails to + run on -38, but does on -37! + it doesn't mean glibc -37 is right + it just means the ntpdate case seems to be handled correctly + a correct implementation is *ALWAYS* correct + if there is one wrong case, it's not, and we know our select/poll + implementation is wrong + no of course not, and the ntpdate implementation is not correct? + file a bug upstream then. + you're starting to say stupid things again + ntpdate and gnulib tests can't be right if they use code that + isn't right + it doesn't mean they'll always fail either, the programs that fail + are those for which select/poll behaves wrong + same thing for setitimer btw + we know it was wrong, and i think it was never working actually + where are the missing test cases then? maybe you should publish + correct code so we can try it out? + i have, but there are dependencies that prevent using it right now + which is why i'm waiting for pthreads hurd to spread + pthreads provide the necessary requirements for select to be + correctly implemented at server side + well conformance with your code could be tested on Linux, + kFreeBSD, etc + ? + i'm not writing test units + /code/test code/ + the problem is *NOT* the test code + the problem is some of our system calls + it's the same for ntpdate and gitk and all other users + then the gnulib, ntpdate, gitk code is _not_ wrong + no, but their execution is, and thus their results + which is ok, they're tests + they're here precisely to tell us if one case works + they must all pass to hope their subject is right + so, again, since there are several problems with our low level + calls, you may have fixed one, but still suffer from others + so even if you did fix something, you may not consider the test + failure as an indication that your fix is wrong + but if you try to make your changes fix everything just to have + results that look valid, it's certain to fail, since you only fix the + client side, and it's *known* the server side must be changed too + do you consider unsubmitted-single-hurdselect-timeout.diff and + local-select.diff a hack or not? + the first isn't, since it fixes the correctness of the call for + one case, at the cost of some performance + the second clearly is + which is the difference between unsubmitted-* and local-* + and my proposal to modify the first is a hack? + yes + it reverts a valid change to "make things work" whereas we know + the previous behaviour was wrong + that's close to the definition of a hack + "make things work" meaning breaking some applications? + yes + in this case, those using poll with one file descriptor and + expecting a timeout, not twice the timeout + well, your change isn't really a revert + hum yes actually it is + the timeout is correct + no, it looks correct + how did you test it ? + and same question as yesterday: why only poll ? + see the code I mentioned before + no i won't look + it doesn't explain anything + I have not found any problems with select, only poll (yes, this + is a user perspective) + that's what i call "pure guessing" + you just can't explain why it fixes things + because you don't know + you don't understand what's really happening in the system + there is a good idea in your change + but merely for performance, not correctness + (your change makes it possible to save the mach_msg receive if the + io_select blocked, which is good, but not required) + +See also [[alarm_setitimer]]. + + # See Also See also [[select_bogus_fd]] and [[select_vs_signals]]. diff --git a/open_issues/telnet_session_crash.mdwn b/open_issues/telnet_session_crash.mdwn new file mode 100644 index 00000000..70b29b0f --- /dev/null +++ b/open_issues/telnet_session_crash.mdwn @@ -0,0 +1,18 @@ +[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + + +# IRC, OFTC, #debian-hurd, 2012-12-16 + + oh, we got a "got working by itself" fix + in the past telnetting, logging, and pressing ^C would kill the + telnet session for some reason + (if done too early, like only 10s after connexion) + that's no more for some reason diff --git a/open_issues/term_blocking.mdwn b/open_issues/term_blocking.mdwn index 0ed0b4df..1c8816e1 100644 --- a/open_issues/term_blocking.mdwn +++ b/open_issues/term_blocking.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2009, 2011, 2012 Free Software Foundation, +[[!meta copyright="Copyright © 2009, 2011, 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable @@ -307,6 +307,27 @@ In context of the [[select]] issue. bash +## IRC, freenode, #hurd, 2012-12-27 + + we however have a similar symptom with screen + shells don't terminate + yes + or at least the window doesn't close + the screen problem is the same as the term servers not being properly closed + k + that one is still on my todo list + and not easy + like so many small items on the TODO lists :) + that one is an important one :) + because we're still using legacy pty, the number of terms is + limited + which means at some point we can't log in any more using them + (i regularly kill pty terms on darnassus to avoid that) + it prevents screen and rsyslogd iirc from working correctly, which + is very annoying + there may be other issues + + # Formal Verification This issue may be a simple programming error, or it may be more complicated. diff --git a/open_issues/virtualization.mdwn b/open_issues/virtualization.mdwn index 343f624a..10cf73db 100644 --- a/open_issues/virtualization.mdwn +++ b/open_issues/virtualization.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2010 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2010, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -44,3 +44,5 @@ An index of things to work on w.r.t. virtualization. * [[File_Systems]] * [[Networking]] + + * [[remap_root_translator]] diff --git a/open_issues/virtualization/remap_root_translator.mdwn b/open_issues/virtualization/remap_root_translator.mdwn new file mode 100644 index 00000000..3cb574ae --- /dev/null +++ b/open_issues/virtualization/remap_root_translator.mdwn @@ -0,0 +1,97 @@ +[[!meta copyright="Copyright © 2013 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!tag open_issue_hurd]] + + +# IRC, freenode, #hurd, 2013-01-05 + + so we have a "remap" root translator? + I mean this: + I'd run my shell in a subhurd whose only difference is that the + root is not the system's root, but my own + which catches accesses to /servers/socket/2 for instance + but leaves the rest flow through the system's root + there is just boot, i don't think it can do that + it'd be useful to have that + it'd be a very useful feature + to use another tcp/ip stack etc. + what happens when translators need to locate other translators + used by the client ? + can't it tell the client to ask the real system's root? + (with the same path) + I don't remember the exact reply name + hum, it's getting too fuzzy for my head :p + well, I mean it's just like translator entries in an ext2fs + ext2fs replies "not me, this one" + but what if e.g. a user has its own pflocal, and when calling + another translator, that one wants to contact the pflocal used by the + client ? + ah, that won't work of course + do we actually have such cases btw ? + procfs perhaps + I don't think we'd want it actually + but isn't that required sometimes ? + inside a shell script, yes + for example, a storeio translator could ask about the priority + properties of the client to proc + but I don't remember a case where an external translator would need + the access + well, that's actually what we want + we don't want to fool the storeio with user-provided data :) + yes + unless the user starts the storeio himself, in which case he will + have to re-root it + so it has to locate the right translator, despite not using the + remap root translator + err, it will already + by just using the system's path + ? + maybe you need to say exactly what "it" and "right" are :) + ok, let's imagine your previous example with a subhurd and pfinet + the remap translator would imply that users from the subhurd + *directly* access all services from the main hurd, except when routed + otherwise by the remap translator to pfinet + by "directly", I mean asking the remap translator, which gives as + answer "not me, the root" + now, what if a translator in the main hurd wants e.g. network + stats from pfinet, it will ask the main one, not the one obtained through + remap + yes + that's completely fine + ah + that's fine if the results don't matter + to get network stats from the user pfinet you'd have to be inside + the shell using the remap translator + otherwise they're inconsistent + yes + I don't see why you'd want to get the pfinet stats from outside + you mean ethernet board usage? + service interactions + i can't think of anything relevant with pfinet + but imagine pflocal and credentials + I believe that'd still be ok + i.e. things outside the remap want to know the actual system things + while things inside want to know the remapped things + and you need that to avoid getting fooled by the user remapping + for credentials, i think it works because the client provides + rights, so it would provide rights to the remapped translators in this + case + this would need to be generalized + I believe it's already general + well no + procfs for example will always talk to the "true" proc server + sure + that's what I want from the outside + if the user, from the inside, wants another view, he'll have to + start another procfs + his own one + ok + attached to the remapping diff --git a/user/jkoenig/java.mdwn b/user/jkoenig/java.mdwn index fd12987e..73982239 100644 --- a/user/jkoenig/java.mdwn +++ b/user/jkoenig/java.mdwn @@ -1,4 +1,4 @@ -[[!meta copyright="Copyright © 2011 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2011, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -467,29 +467,7 @@ IRC, freenode, #hurd, 2011-08-17: ##### Open Items - * [[tschwinge]] has to read about RMI and CORBA. - - * MIG - - * Hacking [[microkernel/mach/MIG]] shouldn't be too difficult. - - * (Unless you want to make MIG's own code (that is, not the generated - code, but MIG itself) look a bit more nice, too.) ;-) - - * There are also alternatives to MIG. If there is interest, the following - could be considered: - - * FLICK ([[!GNU_Savannah_task 5723]]). [[tschwinge]] has no idea yet if - there would be any benefits over MIG, like better modularity (for the - backends)? If we feel like it, we could spend a little bit of time on - this. - - * For [[microkernel/Viengoos]], Neal has written a RPC stub generator - entirely in C Preprocessor macros. While this is obviously not - directly applicable, perhaps we can get some ideas from it. - - * Anything else that would be worth having a look at? (What are other - microkernels using?) + * [[open_issues/RPC_stub_generator]] * `mach_msg` -- cgit v1.2.3