RE: Puzzling stack trace

2010-03-26 Thread Peter Steele
>As stated in a earlier message. This may help get the information you need. >Just more of a automated approach to compiling these. Thanks for the script; I'll definitely archive it. Unfortunately, our window for investigating this problem further is over as this customer is upgrading their sys

RE: Puzzling stack trace

2010-03-26 Thread Peter Steele
>Also, you should see if >__svfscanf() calls __srget(). The __svfscanf() call frame may not show up in >gdb if the compiler re-used the callframe from vsscanf for __svfscanf() as an >optimization. I just checked--it does not call __srget()... ___ fr

RE: Puzzling stack trace

2010-03-26 Thread Peter Steele
>Are you absolutely sure the machine you ran gdb on has the exact same libc >etc. as the customer's machine? I just connected to the customer's box and generated the stack trace directly on their box. It looks identical to the one I posted in my original message. Something's not right here...

RE: Puzzling stack trace

2010-03-26 Thread Peter Steele
>Type "frame 9" and see what it says. If the bug is easily reproducable, try >reproducing it with a debugging version of libc (buildworld with >DEBUG_FLAGS=-g) This crash happened at a production customer site--we have the core and the matching binary and our logs for the application that crash

Puzzling stack trace

2010-03-26 Thread Peter Steele
I'm reposting this here since it's a pretty low-level discussion. Hopefully someone here can explain what's going on. We had an app crash and the resulting core dump produced a very puzzling stack trace: #0 0x0008011d438c in thr_kill () from /lib/libc.so.7 #1 0x0008012722bb in abort

RE: ntpd hangs under FBSD 8

2010-02-26 Thread Peter Steele
>So this is arguably a Python bug. Did you contacted anybody who cares about >the Python ? I did not, mainly because this link: http://bugs.python.org/msg61870 seems to imply they are already aware of the problem. I agree it must be a Python bug though. It worked in 2.5.1 but not in 2.5.5 and

RE: ntpd hangs under FBSD 8

2010-02-25 Thread Peter Steele
> We'll likely go with this solution instead of downgrading Python and the > related libraries. In fact I came up with another solution. I realized that since the problem was related to the process signal mask, instead of called ntpd directly, wrap it up in a C app that resets the signal mask t

RE: ntpd hangs under FBSD 8

2010-02-25 Thread Peter Steele
>Very wild guess, check the process signal mask of the child for both methods >of spawning. I'm running ntpd through Python. How do I check the process signal mask? I did some quick searches and it seems Python does not support sigprocmask(). In my searches I came across this link: http://bug

RE: ntpd hangs under FBSD 8

2010-02-25 Thread Peter Steele
>I think problem not in ntpd, since I use ntpdate. And in 50% times, when it >run from startup script, it hangs with kernel. >No Ctrl+C work, kernel don`t answer for ping, just freeze. >Problem somewhere in kernel, maybe in subsystems that set new time, maybe in >network(UDP) parts. >This problem

RE: ntpd hangs under FBSD 8

2010-02-24 Thread Peter Steele
>> make install should be done with DEBUG_FLAGS containing -g too, otherwise >> strip(1) is called on the installed binary. > >Doh, yes. I did not do this; that's likely my problem. Thanks. ___ freebsd-hackers@freebsd.org mailing list http://lists.freeb

RE: ntpd hangs under FBSD 8

2010-02-24 Thread Peter Steele
>I bet ntpd doesn't call select() in all that many places. Instead of going to >all this trouble to build a debugging libc, you could just >grep for select() and place breakpoints on all occurrences. (It might also be >obvious from looking at them which one is the offender.) I just checked--th

RE: ntpd hangs under FBSD 8

2010-02-24 Thread Peter Steele
>> How do I get libc built with full debug symbols? > >I haven't tried it by myself but think here is the way to go: put the >following to /etc/make.conf and recompile needed libraries / ports. >WITH_DEBUG=yes >DEBUG_FLAGS=-g That didn't seem to have any effect. I still see -O2 being used instea

RE: ntpd hangs under FBSD 8

2010-02-24 Thread Peter Steele
>> What's the proper way to build a debug version of libc and the other >> libraries? I tried this: > >You can just do this: > >cd /usr/src/lib/libc >make clean >make DEBUG_FLAGS=-g >make install When I tried this the make actually failed with various errors. So I decided to do a full "make buil

RE: ntpd hangs under FBSD 8

2010-02-24 Thread Peter Steele
>You're going to need a debug version of libc, too. gdb won't be able to find >a backtrace out of a libc function without it. What's the proper way to build a debug version of libc and the other libraries? I tried this: export CFLAGS="-O0" make buildworld make installworld DESTDIR=/mydir and

RE: ntpd hangs under FBSD 8

2010-02-22 Thread Peter Steele
>You're going to need a debug version of libc, too. gdb won't be able to find >a backtrace out of a libc function without it. Yeah, you're right. This is definitely an annoying bug... ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.o

RE: ntpd hangs under FBSD 8

2010-02-22 Thread Peter Steele
>Just out of curiosity, can you attach to the process via gdb and get a >backtrace? This smells like a locked pthread_join I hit in my own code a few >weeks ago I'm not using the debug version of ntpd so the backtrace isn't too useful, but here's what I get: (gdb) bt #0 0x000800d52bfc in

ntpd hangs under FBSD 8

2010-02-19 Thread Peter Steele
I posted this originally on the -questions list but did not make any headway. We have an application where the user can change the date/time via a GUI. One of the options the user has is to specify that the time is to be synced using ntp. Our coding worked fine under BSD 7 but since we've moved

RE: How can I force boot from alternate drive with boot.config?

2010-02-09 Thread Peter Steele
>>> So, more precisely, if I wanted to boot from drive 1, I'd use this? >>> >>> 1:ad(1p3)/boot/loader >> >>Yes, unless there are more bugs hiding. :-) I fixed a few in August last year. > >Well, I'll give it a try and let you know if I find new bugs... :-) I just tried this and it works as advert

RE: How can I force boot from alternate drive with boot.config?

2010-02-08 Thread Peter Steele
> I use: ad(0p3)/boot/loader So, more precisely, if I wanted to boot from drive 1, I'd use this? 1:ad(1p3)/boot/loader ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail

How can I force boot from alternate drive with boot.config?

2010-02-08 Thread Peter Steele
I've asked this on the -questions list but haven't had any feedback. I have a system configured with multiple identical drives each loaded with FreeBSD. When I was using MBR partitioning, I could create a boot.config to force the system to boot from a specific drive. For example, if I wanted to

Converting a bootable USB stick in to bootable CD-ROM

2009-11-10 Thread Peter Steele
I posted this on the -questions list but didn't get any replies. I have a FreeBSD image that I install on USB sticks to build new systems. When the stick boots it automatically clones itself on the system's hard drive, creating partitions and other configuration parameters that are programmed in

RE: How to signal a time zone change?

2009-08-07 Thread Peter Steele
>What's the value of the TZ environment variable for the C apps? You may need to have them read the new value from somewhere, and then rerun tzset(). The default value of the TZ environment variable is null. I just tried passing the explicitly time zone value to the C app and setting TZ to that va

RE: How to signal a time zone change?

2009-08-07 Thread Peter Steele
>You need to signal your app in some way.. Assuming you have source for the app then you can monitor /etc/localtime (or /etc) for change with kevent. Signaling our C apps aren't the problem. We have an IPC framework in place and we can easily tell the C apps when the user has changed the time zone

How to signal a time zone change?

2009-08-07 Thread Peter Steele
We have a suite of applications with a Java GUI controlling everything. One of the actions the user can perform is to set the time zone. We do this through our Java application and update the /etc/localtime as required. We also make an API call to tell the JVM that the time zone as changed, and fro

Number of open files per process

2009-06-22 Thread Peter Steele
Is it possible to determine the number of open files per process? We want to monitor this via a separate process and issue an alarm if some threshold is crossed. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/fr

WARNING: Expected rawoffset 0, found 63?

2009-03-25 Thread Peter Steele
I posted this on the questions list but didn't get a lot of traction. I've created GEOM mirrored file systems on two slices of my system's drives and everything seems to be working, but I get the warning s WARNING: Expected rawoffset 0, found 63 WARNING: Expected rawoffset 0, found 50332464

Re: How to tear down a geom mirror?

2009-03-06 Thread Peter Steele
ow to tear down a geom mirror? Peter Steele wrote: > > Yes. The "clear" commands usually just zero-out the last sector of the > > underlying provider (doesn't matter if it's a drive, slice or something > > altogether different) so you don't have to d

Re: How to tear down a geom mirror?

2009-03-06 Thread Peter Steele
>Yes. The "clear" commands usually just zero-out the last sector of the >underlying provider (doesn't matter if it's a drive, slice or something >altogether different) so you don't have to do it manually. So, as a generic solution then I could just iterate through all slices of all drives and

Re: How to tear down a geom mirror?

2009-03-06 Thread Peter Steele
>gmirror and various other geom modules store their metadata on the last >sector(s) of the drive, so you need to wipe that too. In our case the systems we are using aren't mirroring the whole drive, just certain slices. Some systems have a single slice mirrored (plus an unmirrored slice), and

Re: How to tear down a geom mirror?

2009-03-06 Thread Peter Steele
> Or simply use the "clean" command, for example "gmirror clean" (also >supported in other GEOM classes). Can I do a gmirror clean without first doing a gmirror load? That's what I want to avoid since it can hang if the mirror is is a bad state. ___

How to tear down a geom mirror?

2009-03-05 Thread Peter Steele
I posed this question in the questions list but didn't get any traction. Hopefully someone here will have an answer. I've created a USB boot disk that is used to clone itself onto the systems hard drives, setting up mirrored file systems in the process. The main difficulty I'm having is reimag

RE: FreeBSD boot menu is missing

2008-11-27 Thread Peter Steele
>I wouldn't use a sysinstall script. Yeah, I should probably have done it that way but I inherited the existing sysinstall framework from someone else and ended up extending it to use gmirror. I know more about this area now and I'd like to redo the whole thing, avoiding sysinstall. That will h

RE: FreeBSD boot menu is missing

2008-11-27 Thread Peter Steele
>So what you do, instead, is make sure there is a little space left over >at the end of the slice that you create in the first step. Then, once >gmirror is available, you gmirror label the slice, then gmirror insert >the corresponding slice on the other disk(s), and gmirror rebuild. No >copying i

RE: FreeBSD boot menu is missing

2008-11-27 Thread Peter Steele
>Mirroring the entire slice is far simpler. If you mirror individual >partitions, you have to label them *before* you newfs them. What we're really trying to accomplish is an automated install via a PXE boot server. Unfortunately gmirror isn't available in mfsroot at the point the file systems

RE: FreeBSD boot menu is missing

2008-11-26 Thread Peter Steele
>He had you install a stock MBR on the second disk. You never copied >the boot loader from the first disk, so that's what you're going to >use when you boot from the second disk. You need to install the boot >block you want on the second disk. Which probably means >boot0. boot0cfg will do that for

RE: FreeBSD boot menu is missing

2008-11-26 Thread Peter Steele
>The phrase "and copy the file systems over to the mirror" worries >me. Do you actually copy the file systems, or do you let the mirror >system do it for you? In particular, are you mirroring file systems or >the entire disk? Because the boot blocks aren't part of any file >system, so you won't hav

FreeBSD boot menu is missing

2008-11-26 Thread Peter Steele
I have a procedure for converting a FreeBSD box to use a mirrored slice for the OS. Everything working fine except that after I've made the conversion I am no longer getting the normal boot menu, the one that counts down 10 seconds waiting for the user to pick on option. I see a single line sh

RE: Hot swapping SATA drives

2008-11-25 Thread Peter Steele
>Use a real hot-swappable drive plane, attached to a good SATA controller >that handles hot-swap in hardware? :) > >Use ZFS, which seems to work better with drives being added/removed than >ata(4)? :) > >Sorry, the few systems we have running FreeBSD either have single IDE >drives, single SATA

Hot swapping SATA drives

2008-11-25 Thread Peter Steele
I've done some searches regarding FreeBSD's 7 support for the hot swapping of SATA drives and the general consensus appears that it *is* supported, but not necessarily with all drive models/brands. In our own testing, we've discovered that our Seagate 250GB drives cannot be hot swapped in our serve

RE: What are proper install.cfg for configuring multiple slices?

2008-11-19 Thread Peter Steele
>I want to do an automated sysinstall through an install.cfg script and >the script partition the install disk into three slices. I've been going >through various tests trying to figure out what the proper directives >are but I haven't had much luck, and I can't find any good examples. After a lot

RE: How can I add new binaries to the mfsroot image?

2008-11-18 Thread Peter Steele
>You wouldn't have to do so - you could just run a shell script from sysinstall and do what you want. That brings me back to my original problem. Yes, I can run a shell script from sysinstall, but gmirror isn't available in mfsroot, and adding gmirror to mfsroot isn't straightforward because it ne

What are proper install.cfg for configuring multiple slices?

2008-11-18 Thread Peter Steele
I want to do an automated sysinstall through an install.cfg script and the script partition the install disk into three slices. I've been going through various tests trying to figure out what the proper directives are but I haven't had much luck, and I can't find any good examples. Here is a snippe

RE: How can I add new binaries to the mfsroot image?

2008-11-18 Thread Peter Steele
>What I've done in the past is skip sysinstall alltogether and just boot >of an NFS root. Then use custom scripts for the slicing/partitioning/ >mirroring, copy a minimal system to disk and pkg_add the rest. >Would be nice to do all this with install.cfg though. Please let me know >when you get

RE: How can I add new binaries to the mfsroot image?

2008-11-18 Thread Peter Steele
>I believe you modify /usr/src/release/${ARCH}/boot_crunch.conf to do this. > >I haven't actually tried though... > >I think it would be possible to have a 'GEOM' menu that you can run prior to fdisk, label, etc that would allow you to >do some basic stuff like this. > >While the sysinstall code is

RE: How can I add new binaries to the mfsroot image?

2008-11-17 Thread Peter Steele
>I'll have to check this out. I'm not getting anywhere with trying to >customize mfsroot with my current approach... The goal we are trying to achieve btw is to make gmirror available during an install so that the file systems are mirrored right from the get-go, so that we can avoid having to go t

RE: How can I add new binaries to the mfsroot image?

2008-11-17 Thread Peter Steele
>I'll have to check this out. I'm not getting anywhere with trying to >customize mfsroot with my current approach... The goal we are trying to achieve btw is to make gmirror available during an install so that the file systems are mirrored right from the get-go, so that we can avoid having to go t

RE: How can I add new binaries to the mfsroot image?

2008-11-17 Thread Peter Steele
>I'm not sure, but probably the installation CD doesn't carry shared libraries at all? All binaries in /stand are >static-linked ones. Yeah, that is absolutely the problem--no shared libraries are available when sysinstall is running. >You could also try scripts from mfsbsd project: >http://peop

RE: How can I add new binaries to the mfsroot image?

2008-11-16 Thread Peter Steele
> How does it fail? There doesn't seem to be any error generated. Or at least I tried to capture stderr and got nothing. > Is the binary you added statically linked? The command I'm doing most of my testing with is gmirror. I pulled it from one of our operation FreeBSD boxes, and it appears to b

How can I add new binaries to the mfsroot image?

2008-11-16 Thread Peter Steele
I want to make a custom FreeBSD install CD-ROM with additional commands available in the mfsroot image. Adding the new commands to the image is easy enough, and I've made an install.cfg file on the CD-ROM as well so that when the CD runs the commands in install.cfg are automatically executed. This