The discussion about direct and indirect dependencies is coming up again on the FreeBSD mailinglists. Seems I should make some blog post about it, maybe it makes this topic more findable than my postings in the mailinglists.
Some definitions:
- A direct dependency from A to B is when program/port A uses symbols from library/port B.
- An indirect dependency from A to C is when program/port A uses symbols from library/port B but no symbols from library/port C, and library/port B uses symbols from library/port C.
- An explicit dependency from A to C is when it is a direct or indirect dependency A to C, and when the compiler-time-linker added an explicit reference to C to the program/lib of A.
Ideally we have no indirect dependencies in the explicit dependencies, only direct dependencies. Unfortunately in reality we also have indirect dependencies there. This has at least two causes:
- libtool (at least 1.x) does not (or was not) come with a hint on FreeBSD, which tells that the run-time-linker is recursively resolving dependencies.
- Some pkg-config setups list indirect dependencies as explicit dependencies (IIRC it depends if Requires.private and/or Libs.private is used in the .pc file or not; if it is used, there should be no indirect dependency appear from this software, but I am not 100% sure about this).
Three years ago I wrote /usr/ports/Tools/scripts/explicit_lib_depends.sh, it looks at the files of a given port (it needs to be installed), and prints out explicit dependencies. Because of the indirect dependencies which could be listed there, this list is not a list of ports which are real dependencies from a source code point of view, but it reflects the link–time reality. If a port C shows up there, the port which is checked needs to be rebuild in case the ABI of library/port C changes.
GD Star Rating
loading…
GD Star Rating
loading…
Tags: abi,
dependencies,
explicit reference,
link time,
linker,
list of ports,
mailinglists,
pkg,
run time,
time reality —
Seems that I will actively mentor again in this Google Summer of Code (as opposed to just review the submissions from students and/or acting as a fall-back mentor).
The project I will mentor is the “Make optional kernel subsystems register themselves via sysctl”-one from the FreeBSD ideas page.
The student already got into contact with me and it looks like he is motivated (he is already subscribed to several FreeBSD mailinglists, which is not a requirement we have in our GSoC docs).
GD Star Rating
loading…
GD Star Rating
loading…
Tags: docs,
fall back,
freebsd,
google,
gsoc,
kernel,
mailinglists,
mentor,
submissions,
subsystems —
Due to the problems with a 7–stable machine, I had a look at some unmerged fixes for ZFS (58 changes not merged).
I backported some of those changes from 8-stable to 7-stable, I have this running on one 7-stable machine. I would like to get some more feedback for it (even an “it works for me” would be great). The main part of this change is that the FreeBSD taskqueue is used now instead of the opensolaris one (and some other changes which may improve the ZFS experience).
It would also be nice if someone could have a look at the FIRST_THREAD_IN_PROC part. Can there be more than one thread at this place (I do not think so) and I should use FOREACH_THREAD_IN_PROC_instead?
How to apply:
- cd /usr/src/
- fetch http://www.Leidinger.net/FreeBSD/test/releng7_zfs_merge3.diff
- fetch http://www.Leidinger.net/FreeBSD/test/opensolaris_taskq.c
- fetch http://www.Leidinger.net/FreeBSD/test/taskq.h
- mv taskq.h sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h
- mv opensolaris_taskq.c sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c
- patch –p 0 –quiet <releng7_zfs_merge3.diff
- ignore the 2 .rej files
- rm –f sys/cddl/compat/opensolaris/sys/taskq_impl.h*
- rm –f sys/cddl/compat/opensolaris/sys/taskq.h*
- rm –f sys/cddl/contrib/opensolaris/uts/common/os/taskq.c*
- rebuild kernel
I do not list all of those 16 of 58 outstanding patches which are covered here, a detailed list can be found on the stable and fs mailinglists.
GD Star Rating
loading…
GD Star Rating
loading…
Tags: c patch,
compat,
impl,
kernel,
mailinglists,
mv,
opensolaris,
stable machine,
sys,
zfs —
On the machine where I host this blog, I have/had some stability problems.
Last week I updated the machine from FreeBSD 7.1-pX to 7.2-p5 (GENERIC kernel in both cases). 5 – 10 Minutes after the reboot into the new version the machine had a deadlock. After some roadblocks (ordering a KVM-switch from the hoster, the KVM-switch not working with a proxy (during lunchtime at work), a broken video-capture of the KVM-switch and a replacement on Monday morning to not pay the WE-fees), I spend a big part of the night to get it stable. I tried disabling SMP, enabling INVARIANTS and WITNESS, changing the scheduler, cutting the software mirror (to rule out a mismatch between the content of the disks after all the hard reboots) and updating to 7-stable.
Unfortunately nothing helped.
Googling a little bit around (it is a AMD Dual–Core system with NVidia MCP61 chipset) was leading me to a post on the mailinglists from 2008 which talks about an issue with the buffer cache. I do not know if this is still an issue (I have send a email to kib@ to ask about it), and my scenario is not the same as the one which is described in the mail, but because of this I decided to switch one of the two UFS mirrors to ZFS.
The first boot into the ZFS caused again a reboot after some minutes (I do not know if it was because of a memory exhausted panic, or because of a deadlock), but as I did not tune the kernel for ZFS I am tempted to believe that I should not count that. Now, after tuning the kernel (increasing the kmem_size to 700M, no prefetching, limiting the ARC to 40M) it is up since nearly 2h (as of this writting… crossing fingers). Before it was not able to survive more than some minutes with just the jail for the mails up. Now I not only have the mail-jail up, but also the jail for the blog (one jail still disabled, but I will take care about that after this post).
I do not know if only increasing the kmem_size would have helped with the problem, but as I was testing a GENERIC kernel + gmirror module in the beginning, I expected that the auto-tuning of this value should have been enough for such a simple setup (2GB RAM, 2 disks with 3 partitions each, one partition pair for root, one for swap, one for the jails).
I hope that I stabilized the system now. It may be the case that I will test some patches in case someone comes up with something, so do not be surprised if the blog and email to me is a little bit flaky.
GD Star Rating
loading…
GD Star Rating
loading…
Tags: amd dual core,
buffer cache,
core system,
generic kernel,
invariants,
mailinglists,
prefetching,
software mirror,
stability problems,
switch one —
After two weeks of holiday I have about 5.400 emails (about 51 MB, downloaded and filtered in 3h). Split up this is:
- 2763 from FreeBSD mailinglists
- 320 SPAM (101 false positives, mostly FreeBSD related… I should have a look at this and take appropriate actions)
- 115 in the normal inbox = personal + not filtered emails (18 false negative SPAM)
- 16 postmaster related, e.g. bounces from forged SPAM, 4 of them are not SPAM bounces but valid mails…
- 114 security related (Bugtraq, …)
- 220 status messages (e.g. FreeBSD periodic mails from various systems)
- the rest is various other (filtered away) mails
It will take a while until I had a look at them…
GD Star Rating
loading…
GD Star Rating
loading…
Tags: false positives,
freebsd,
holiday mail,
mail stats,
mailinglists,
postmaster,
spam,
split up,
status messages —