Re: Recursive mutex safe on FreeBSD 6.2
Am Montag, 25. Februar 2008 11:28:36 schrieb navneet Upadhyay: can we use recursive mutex on 6.2 freebsd ?? Why not? FreeBSD is POSIX-compliant (unless otherwise specified; see pthread.h for details), and AFAIK it is for recursive mutexes (at least I haven't found anything else so far while using them). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FreeBSD Linux distro
Am Donnerstag, 21. Februar 2008 15:58:51 schrieb James Harrison: 8. Most extensive collection of third party software (over 18000 ) only second to Debian. Looking back at it, I'm surprised I didn't mention that. Gentoo has over 24 thousand ebuilds, where an ebuild is their equivalent of a port: Err, don't confuse ebuilds with packages. A package is a piece of software (which is the equivalent of a port), whereas an ebuild is an install script for a specific version of a package. Normally, there's more than one version of a package (more than one ebuild) available for a package, which makes the ebuild count higher than the FreeBSD ports count, but the package count lower (somewhere above 12000). This doesn't count slotted ebuilds: for example, Gentoo has just one gtk package, which contains several ebuilds for slot 12 which is gtk-1.2.x and several ebuilds for slot 20, which is gtk-2.x (different slots are treated as different packages by the system internally), whereas FreeBSD has a gtk12 and a gtk20 port, which installs the respective versions. So, basically whatever numbers you take, they can't be compared directly anyway, but I guess that the number of ports is still higher than the Gentoo amortized package count would be. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: 32 bit FreeBSD compiled binary coredumps on 64 bit(amd) FreeBSD
Am Mittwoch, 20. Februar 2008 07:17:30 schrieb navneet Upadhyay: I am compiling the binary on 32 bit FreeBSD and running it on 64 (amd64)bit FreeBSD . FreeBSD says it is possible to do so. But my application core dumps . I investigated the reason which is as follows : The problem is in the call retval = sysctl(mib, 4, kp, sz, NULL, 0); where sz is size of kp and where kp is a structure of type kinfo_proc. The size of this structure on 32bit system is 768 and on 64 bit system is 1088. The call works on 32 bit system but when run on 64 bit system it coredumps , because of the size mismatch of kinfo_proc . If i hardcode the sz to 1088 then it works on amd64 systems , how do i deal with it. I am anticipating lot of coredumps like that, what is a generic solution for such kinds of problems. Without investigating further whether the structure up to byte 768 is different (wrt. structure member offsets, and thus wrt. to hardcoded constants in the binary file), which would be a real showstopper for the i386-emulation on amd64 (and thus I can't see it being that way), see the documentation of sysctl: RETURN VALUES Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS [ENOMEM] The length pointed to by oldlenp is too short to hold the requested value. So, basically, you should check in the call whether sysctl returned -1 (with errno set to ENOMEM), and enlarge the buffer if so, until it doesn't return -1 anymore. This should handle i386 and amd64 transparently (if the offsets up to byte 768 are equal/similar). In case you're trying to recompile the application on 64-bit, you should use sizeof() anyway to automatically adapt the initial buffer size reserved for the output buffer depending on the definition of the structure (which will also spare you pain if a FreeBSD upgrade changes the structure). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: 32 bit and 64 bit freebsd binary compatiblty
Am Dienstag, 19. Februar 2008 15:08:12 schrieb Wojciech Puchar: Can anyone tell how do we handle this situation??? Is there any way or i have to compile my code on 64 bit machine?? what's a problem to compile on 64-bit machine? Ugh, there can be lots of problems, at least if the original programmers weren't careful enough to avoid the many pitfalls of inter-architecture development. For example, in C, the long type is 32-bits wide on i386, and 64-bits wide on amd64, whereas int is 32-bits wide on both. Take the following code: #include stdio.h int main(int argc, char** argv) { int x; unsigned long y = (unsigned long)x; printf(%x\n,y); return 0; } The formatting code %x expects an unsigned integer, but is given an unsigned long (which is always big enough to fit an address, that's mandated by the C standard, and so will contain the memory address of x). gcc only warns about the non-matching format-string argument when run with -Wall. On i386, this doesn't matter, as sizeof(int)==sizeof(long). On amd64, this does matter, as printing a %x will only print the low-order four bytes of the memory address, and not the upper four bytes, so that the output string will no longer be unique for object x, depending on how the virtual memory space is partitioned. Now, I've seen quite a good deal of software who do stuff similar to this (at least in spirit, by casting an address to an unsigned integer) to build (hash) tables, and they all miserably fail when compiled on amd64, simply because they presume that sizeof(int) == sizeof(long), which isn't true on amd64 anymore. If the OP's development team haven't taken care to avoid these pitfalls from the start (which I guess they didn't, simply because they are only used to developing on i386), they can be in for a real treat when trying to compile _and run_ their application on amd64. I know I've had my fair share of (re-)learning to do when initially compiling my (personal use) C++ programs on amd64. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Get the empty space on a file system
Am Montag, 18. Februar 2008 11:25:39 schrieb Olivier Nicole: How to: 1) knowing the name of the directory, how toknow the file system it belongs to (not considering symbolic links, I can decide that the directory is always a real path); 2) knowing the file system from 1), how to check the remaining space in the file system? man 2 statfs man 2 statvfs The former is freebsd-specific, though (AFAIK); the latter is portable (i.e., POSIX), but might return garbage (which is also indicated in the man-page for it). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: make not working gmake works
Am Montag, 18. Februar 2008 16:02:34 schrieb navneet Upadhyay: I have a Makefile . It works well with Linux versions when i use make command.The make command fails on FreeBSD but gmake works fine. Any clues on this behavior? make != gmake on *BSD. BSD-make (i.e., make) is a completely different beast from GNU-make (i.e., gmake). Generally, Makefiles written for one (except for very simple ones) won't run under the other, and vice-versa. man make should get you started on the BSD-make syntax and its featureset. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FW: failure notice
Am Dienstag, 12. Februar 2008 09:03:10 schrieb Da Rock: Anybody know why this would be happening to me? Every time I post I get this back, yet my post shows up on the list. You're sending from a hotmail.com address, without using a hotmail.com server as outgoing mail relay. Someone who's reading this list (and thus gets your messages delivered, even though you're not explicitly sending it to them) is boucing your messages because of the SPF record for hotmail.com in place, which lists the outgoing mail servers that messages from the hotmail.com-domain is allowed to come from (and the one you use isn't among them). Read up on SPF (Sender Policy Framework) to know what's going on behind the scenes. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FW: failure notice
Am Dienstag, 12. Februar 2008 09:40:55 schrieb Heiko Wundram (Beenic): Am Dienstag, 12. Februar 2008 09:03:10 schrieb Da Rock: Anybody know why this would be happening to me? Every time I post I get this back, yet my post shows up on the list. You're sending from a hotmail.com address, without using a hotmail.com server as outgoing mail relay. Ugh, I should have checked your mail headers before posting this. You are sending from a hotmail.com server. So, either hotmail has their SPF-records misconfigured (which I would guess isn't the case, because lots of people would complain in this case), or the final recipients SPF setup on their mailserver (mail.163.com) is broken (which I guess is most probably the case here). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: what happened to linuxflashplugin?
Am Montag, 11. Februar 2008 15:32:26 schrieb Erich Dollansky: Hi, Reid Linnemann wrote: Written by James on 02/10/08 21:59 I just tried a portupgrade out and it failed on linux flashplugin. Apparently, none of the file exist in the ftp repositories anymore. Any idea what happened there? James from /usr/ports/UPDATING: 2006-04-08 Affects: users of www/linux-flashplugin* Author: [EMAIL PROTECTED] Reason: These ports have been removed because the End User License Agreement explicitly forbids to run the Flash Player on FreeBSD. For more details, see http://www.macromedia.com/shockwave/download/license/desktop/. I could not find the word FreeBSD in the license agreement. BSD also does not appear there. Read this (in the license agreement): ... For the avoidance of doubt, no embedded or device versions of the above operating systems, or any other operating systems, are included as Authorized Operating Systems. ... 2.1You may install and use the Software on a single desktop or laptop computer that runs an Authorized Operating System. A license for the Software may not be shared, installed or used concurrently on different computers. ...where Authorized Operating Systems is only Windows, Linux, Solaris and Mac OS as defined before the initial sentence, and as such, there's no clause that allows you to use the software on BSDs, and finally, that makes it forbidden to use on BSDs. This is another reason why Flash is bad, bad, bad. Am I repeating myself? -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How do I get unicode support in python?
Am Freitag, 8. Februar 2008 15:26:48 schrieb Eric Mesa: I'm running a web server with FreeBSD 6.1-RELEASE and python 2.4.3. I'm unable to print any characters outside of ascii. I have tried this code on my Linux computer, which has python 2.5.x and it works - so the code is solid. What do I need to do to get python on the web server to have unicode support? Is there a module/package I need to import in the 2.4 series? Or is there some package/port I need to install? Or do I just recompile python with some different flags? (And does that entail any uninstalling first?) For Python to be able to print unicode characters to the console, it must know the encoding of the console. Generally, this entails setting up LC_ALL and LANG and of course your terminal (emulator) appropriately, and testing whether the interpreter sets the correct encoding on startup (which can be found as sys.getdefaultencoding()). When the encoding that the interpreter uses to print _unicode_-strings cannot encode the unicode characters you hand it to the current default encoding, the codec barfs: [EMAIL PROTECTED] ~]$ python Python 2.5.1 (r251:54863, Nov 6 2007, 19:02:51) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd7 Type help, copyright, credits or license for more information. import sys sys.getdefaultencoding() 'ascii' print u\xfa Traceback (most recent call last): File stdin, line 1, in module UnicodeEncodeError: 'ascii' codec can't encode character u'\xfa' in position 0: ordinal not in range(128) print u\xfa.encode(latin-1) ú Basically, the easiest resolution is to do the conversion yourself (like I did in the second example). The other possibility is to change the deault encoding to something that matches your default console (probably latin-1), which you can do in /usr/local/lib/python2x/site.py. HTH! -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Some ideas for FreeBSD
Am Freitag, 8. Februar 2008 17:54:03 schrieb [EMAIL PROTECTED]: Well, actually, these are file backed swap devices. You can do both file and memory backed devices. this allows you to have a swap file on the hard disk and mount it. As I already wrote in another part of this thread: please explain to me why it should be faster to have a file backed md set up as swap than a dedicated swap partition (because there's at least two more levels of indirection involved). I can clearly see the need for file backed swap in special cases (for example, where you need RAM desperately, for example for a compile, but cannot add another partition to a system), but no matter what, it will never be faster than a swap partition. And that was what the original poster of this sub-thread suggested (and as such, I took it that he was referring to memory-backed mds, because file-backed mds are never faster than raw access to a hard-disk). So, I still stand by my first assessment: the idea to use an md as swap is stupid, at least from a performance standpoint. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Strange apache logs
Am Donnerstag, 7. Februar 2008 13:39:04 schrieb Dragan Jovelic: Couple of days ago I moved one web (PHP) application to new server running FreeBSD 6.2, with apache 2.2.8 installed. Everything is fine, except I have in httpd access_log lot of requests like this: ::1 - - [06/Feb/2008:13:43:58 -0500] OPTIONS * HTTP/1.0 200 - ::1 - - [06/Feb/2008:13:43:59 -0500] OPTIONS * HTTP/1.0 200 - ::1 - - [06/Feb/2008:13:44:00 -0500] OPTIONS * HTTP/1.0 200 - They are appearing all the time (looks like one request every second). snip That's a request from localhost to localhost (except that Apache is being connected to on the IPv6 localhost address and not on the IPv4 localhost of 127.0.0.1). Check whether you have some monitoring tool (which is the only thing I can think of that would query the server once a second) running on the server, which check whether Apache is up. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Strange apache logs
Am Donnerstag, 7. Februar 2008 15:45:39 schrieb Dragan Jovelic: Thanks for quick answer. I understand it is from localhost, but can't figure out what it is. Only things running there are apache and mysql server. In processes I see nothing strange, sockstat gives that all opened sockets belong to www/httpd. I suspect this is something with apache, but can't find what. Any ideas? Not me, at least if you don't post ps aux and relevant parts of what you changed in the apache configuration (which someone else is probably also going to want to see to help you diagnose this). ;-) -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Some ideas for FreeBSD
Am Donnerstag, 7. Februar 2008 07:32:16 schrieb Jason C. Wells: Norberto Meijome wrote: But I agree with Wojciech..do you really want to use swap files? One could mount an md filesystem and then use that as swap. That way you wouldn't need to use any disc space. As a plus, the performance would be way better than disc. Ahem, sorry, that's just plain stupid. Either the md system is backed up by RAM (in which case you don't need the swap anyway; why'd you want to access RAM by putting it in a swap on an md in RAM?), or it's backed up by swap, in which case you have a chicken and egg problem. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Some ideas for FreeBSD
Am Donnerstag, 7. Februar 2008 08:26:07 schrieb Dominic Fandrey: Heiko Wundram (Beenic) wrote: Am Donnerstag, 7. Februar 2008 07:32:16 schrieb Jason C. Wells: Norberto Meijome wrote: But I agree with Wojciech..do you really want to use swap files? One could mount an md filesystem and then use that as swap. That way you wouldn't need to use any disc space. As a plus, the performance would be way better than disc. Ahem, sorry, that's just plain stupid. Either the md system is backed up by RAM (in which case you don't need the swap anyway; why'd you want to access RAM by putting it in a swap on an md in RAM?), or it's backed up by swap, in which case you have a chicken and egg problem. Or it's backed by a file (-t vnode, which is implicated by -f). I have used files for swap, just to see weather it works, others have done it because they had to. True, sorry I forgot to mention that, but swapping to a file (based on a standard disk) won't get you any speed-ups relative to a (dedicated) swap-partition on a disk either, and that's (if I understood the original poster properly) what was suggested. I can understand the need for swap files (esp. in some environments where there's no easy way to just add physical memory or disk space for a task requiring huge amounts of it), but generally they offer no speed up at all to a dedicated swap (or memory in itself). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: unix domain socket security and PID retrieval
Am Dienstag, 5. Februar 2008 15:28:26 schrieb Zane C.B.: snip As far as I understand the code you've written, that won't work, because you're tying to send/receive the ancilliary messages as socket data, and not as a separate message. Additionally, I don't program any Perl (left that for good about eight years ago), and as such, I won't be of much help putting something together in Perl to do what you want. If you're interested in C code that works (possibly to ask someone more proficient in Perl to translate that), just tell me, and I'll hack something together. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: unix domain socket security and PID retrieval
Am Dienstag, 5. Februar 2008 15:28:26 schrieb Zane C.B.: snip And, on another note, you might be interested in /usr/src/lib/libc/gen/getpeereid.c which implements a function that (internally) uses a socket option (no need to mess with ancilliary messages) to retrieve the value you're looking for. getsockopt() is surely directly exposed in Perl. -- Heiko Wundram Product Application Development - Office Germany - EXPO PARK HANNOVER Beenic Networks GmbH Mailänder Straße 2 30539 Hannover Fon+49 511 / 590 935 - 15 Fax+49 511 / 590 935 - 29 Mobil +49 172 / 43 737 34 Mail [EMAIL PROTECTED] Beenic Networks GmbH - Sitz der Gesellschaft: Hannover Geschäftsführer: Jorge Delgado Registernummer: HRB 61869 Registergericht: Amtsgericht Hannover ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Endianness of freeBSD
Am Montag, 4. Februar 2008 13:03:25 schrieb navneet Upadhyay: 1. Is FreeBSD little Endian like windows? FreeBSD endianness depends on the hardware architecture it runs on (as endianness is a hardware characterization). (Very) generally, anything that's related to an Intel CPU is little-endian, whereas anything that's related to a Motorola, IBM or Sparc CPU is big-endian. (Modern) Windows exists only on little-endian hardware [Intel, AMD and clones] (AFAIK, someone correct me here), so basically it's always little-endian, you could say that. There were Windows versions for other CPUs, though, back in the Windows NT days, which ran on Alpha workstations which were big-endian. 2. Linux is Big endian? Same as for FreeBSD. wrote a code int i = 1;if((i 1) == 0) little else big got little on all platforms bsd,linux,windows. This won't tell you what endianness the platform has. It'll say little for any architecture (because ( 1 1 ) == 0 for any CPU that knows how to do binary shifts). What you can use to test for little or big-endianness, is something like the following: unsigned long test = 0x12345678; char* ptest = (char*)test; if( *ptest == 0x78 ) is little else if( *ptest == 0x12 ) is big else something else ? *Does endianness depends on OS or the hardware?* As I said above: it depends on the hardware. There is even hardware (ARM, in particular) which can run in little- or big-endian mode, depending on how it is initialized. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: unix domain socket security and PID retrieval
Am Montag, 4. Februar 2008 15:21:52 schrieb Zane C.B.: I've come across that mentioned in unix(4). There is no support for it in regards to Perl. Another problem is it requires support for that on both ends. More and more it looks like getting either PID and/or user info about the other process connecting up to it is impossible, with out writing some sort of authentication system for the two to use or both ends have to support the LOCAL_CREDS stuff. I cannot believe that this doesn't exist for Perl (everything exists for Perl in one way or another...), and anyway, a quick search on CPAN found this, which looks as though it's (at least part of) what you're looking for: http://search.cpan.org/~mjp/Socket-MsgHdr-0.01/MsgHdr.pm Finally, thinking back to the last time I used SCM_CREDS on Linux (which is a lng time ago), I'm not even sure that the sender has to send an SCM_CREDS message (which would invalidate my former reply); I think it's enough if the receiver requests to get one (which will be filled in by the kernel), see the description in the referenced page above which shows you how to set up the corresponding recvmsg call. Sending one is only required in case the sender is root and wants to spoof it's credentials to the remote process (IIRC). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: unix domain socket security and PID retrieval
Am Montag, 4. Februar 2008 11:30:21 schrieb Zane C.B.: Been starting to look into writing some stuff that uses unix domain sockets, but I've been running into the problem of figuring out what the calling PID is on the other end. Any suggestions on where I should begin to look? As it currently stands, I am looking at doing this with perl. Check out man 3 sendmsg and man 3 recvmsg (which should be wrapped in Perl in some way or another), and passing SCM_CREDS messages between the two processes. The SCM_CREDS message is filled in my the kernel, so there's no way (unless the other side is root) to spoof the credentials information. This requires that the sending end willingly sends SCM_CREDS (and the receiver uses recvmsg to query for it), and sends at least one byte of data along with the ancilliary message. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Endianness of freeBSD
Am Montag, 4. Februar 2008 14:30:12 schrieb Wojciech Puchar: the Windows NT days, which ran on Alpha workstations which were big-endian. Alpha is little endian. i had alpha 21066 running linux. Not true. Alpha is big- or little-endian (so, it's bi-endian), depending on how it's booted, and IIRC the Windows NT version running on Alpha used the big-endian mode of the CPU. But I might be mistaken. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: changing bzip2 in default distribution?
Am Montag, 4. Februar 2008 23:04:57 schrieb Wojciech Puchar: why bzip2 is still used. grzip from ports (archivers/grzip) is much faster and compresses much better and it's not GNU licenced bzip2 isn't GNU licensed, just to get things straight (straight from www.bzip.org): ...because it's open-source (BSD-style license), and, as far as I know, patent-free. (To the best of my knowledge. I can't afford to do a full patent search, so I can't guarantee this. Caveat emptor). So you can use it for whatever you like. Naturally, the source code is part of the distribution. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: C interpreters
Am Donnerstag, 31. Januar 2008 14:48:15 schrieb Jim Stapleton: as a secondary (probably stupid) question: how hard is it to write a library in C++ and allow C programs to use it? To write a library in C++ to which C programs have access, you'll have to write a set of wrapper functions for every method of a class you want to expose to C which basically get an object pointer as the first parameter and the actual method arguments as the rest. For example: test.cc --- #include test.hh #include test.h Test::Test() { } int Test::something(int data) { return 0; } extern C { TestObject NewTest() { return new Test(); } int TestSomething(TestObject ob, int data) { return reinterpret_castTest*(ob)-something(data); } } test.hh --- #ifndef TEST_HH #define TEST_HH class Test { Test(); int something(int data); }; #endif // TEST_HH test.h -- #ifndef TEST_H #define TEST_H typedef void* TestObject; #ifdef __cplusplus extern C { #endif /* __cplusplus */ TestObject NewTest(); int TestSomething(TestObject ob, int data); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* TEST_H */ test.c -- #include test.h int main(int argc, char** argv) { TestObject testob; testob = NewTest(); TestSomething(testob,1); } This lets you use the compiled test.cc (for example, as a library, to get around the problem of having to link your C-program against libstdc++) together with a C program. Be aware of the fact that C doesn't know function overloading, so you'll basically have to implement that by defining different methods for every type of overloaded function you want to accept. Depending on how large the C++ framework is which you're trying to wrap (and in how much it uses advanced C++ features), this is an easy (i.e., repetitive) or a hard/close to impossible task, especially when it comes to templates. YMMV. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: help
Am Montag, 21. Januar 2008 10:16:40 schrieb Enovation Technologies: my question is how to configure 2 nics with different ip on same box in the same subnet. You know that this makes no sense? At least not in 99.99% of the cases? Maybe you can describe a little more clearly _why_ you want to do this, then somebody might be able to help you more appropriately than me helping you now. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
OT: Greylisting and Yahoo Mailinglists
Hey all! A colleague of mine tracks a Yahoo mailing list, but always gets mails from them with a large delay (or not at all) due to our mailserver doing greylisting. This comes from the fact that the triplet that represents a message sent from a Yahoo mailing list changes with every message (because the envelope-sender _always_ contains a unique ID to do bounce detection). Additionally, I can't seem to make out a set of subnets from which the messages arrive; I've so far identified at least five subnets that Yahoo uses to send messages out (and I'm hesitant to add five subnets to the whitelist, especially when they're not closely related in any way as Yahoos subnets seem to be: 66.94.237, 66.163.168, 66.163.169, 69.147.103 and 209.131.38 is what I've seen so far from old messages at a quick glance). Anybody here have the same problem, and has rules for whitelisting Yahoo mailing lists properly? Thanks! -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: OT: Greylisting and Yahoo Mailinglists
Am Dienstag, 15. Januar 2008 19:08:39 schrieb Chuck Swiger: You didn't mention which mailserver or greylist software you are using, but the postgrey implementation (for use with Postfix) has this in postgrey_whitelist_clients: # greylisting.org: Yahoo Groups servers (no retry) scd.yahoo.com ...and you could choose to whitelist all of yahoo.com just as easily. I am using Postfix, but not postgrey, rather postfix-policyd, which does whitelisting of hosts based on IPs of the connecter. postfix-policyd comes with three blocks of IPs for the Yahoo Groups mailservers in the default whitelist, but none of the IPs I mentioned in my original mail falls into those groups. Sorry for underspecifying my requirements, but that's the reason I was asking specifically. I knew about the postgrey whitelist entry you mentioned. Thanks! -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: system programming
Am Donnerstag, 10. Januar 2008 16:38:47 schrieb Michael S: I am a computer science student taking the operating systems course. All of our assignments are supposed run on Linux and I don't have a Linux machine. I was wondering mostly if FreeBSD uses the same functions for process / thread handling, whether the header files (e.g. unistd.h, stdlib.h, etc) are in the same locations and whether the pthread library is present by default. Whereas both systems could be termed mostly POSIX compliant (and thus you should be able to recompile program sources freely on each of the two without modifications to the source and get equal behaviour), FreeBSD's libc and kernel is (in my experience) more and the glibc (i.e., the most commonly used libc on Linux) and the Linux kernel generally somewhat less close/compliant to the specification in border- or seldom used cases. This includes (for example) the (still, IIRC) default pthreads implementation on Linux (called LinuxThreads, even though a new/better threads implementation has been available for quite some time, called NPTL), which doesn't properly support thread cancellation (or rather doesn't support them at all), and only implements a subset of the POSIX.1c (i.e., POSIX Threads) specification. FreeBSDs pthreads library is fully POSIX.1c compliant, IIRC. Some other things which I've hit when recompiling programs I implemented on FreeBSD for Linux generally concern more esoteric differences, like glibc missing a sys/endian.h (which is a heavens gift), but sys/endian.h isn't part of the POSIX standard anyway. What's not so esoteric though: socket behaviour isn't specified in the POSIX standard either; if you implement networking programs, you'll soon find that for example the error return values differ slightly between the two operating systems, making proper error recovery all the harder. Preprocessor macros are your friend, even in C++. For the rest, the compiler/linker-toolchain you'll use under Linux is (most probably) the exact same as under FreeBSD (i.e., gcc + GNU binutils), and as such you'll not have to expect any problems here. Concerning make: if you stick to writing GNU make Makefiles under FreeBSD, you'll also be on the safe side there, because I've yet to find a properly functioning BSD make implementation for Linux. Finally: stay away from the autotools if you can. They make your brain cringe. And, to finish up: generally you'll not feel the differences. And if you do, you've (most probably) hit operating system specific (i.e., non POSIX-specified) behaviour, anyway, and were on your own from the start. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Problems with OpenOffice 2.3.1 on FreeBSD
Am Dienstag, 1. Januar 2008 14:15:40 schrieb O. Hartmann: I use OpenOffice 2.3.1 on several hardwareplatforms running FreeBSD 7.0-PRE/AMD64 and since I upgraded OpenOffice from OO 2.3.0 to 2.3.1 I have massive problems, rendering OO unusuable! Before doing a PR I would like to aks whethere there is a solution out. Whenever I try to save a document in OO writer, OO gets stuck and I have to kill it. The document gets saved, but I never can load it again without rendering OO unusuable. Opening M$ Word docs or OO docs doesn't matter. Just to chime in: the problem has been identical for me since I upgraded to FreeBSD 7 some two months ago. Any OpenOffice.org build I did (2.3.0 and 2.3.1) fails to save and load any form of documents with the exact same symptoms that you describe (i.e., the UI not being responsive anymore after trying to save or load from a file). I used the Sun JDK source build (1.5) to compile OpenOffice.org, not the Diablo JDK by the way, and if anybody is willing to look at this problem deeper, search this list to see a post of mine where I attached gdb to the running (and hung) OpenOffice.org process and gave a backtrace of where the (100%) CPU time is being spent. IIRC it was in some input filter, but I don't really know anymore. I've since moved on to KOffice, but if there's some fix for this, I'm more than happy to try it out. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: 4GB memory and more
Am Montag, 24. Dezember 2007 23:21:32 schrieb Robert Fitzpatrick: I have a couple of Supermicro servers and upgraded both with more memory. I upgraded our ESMTP server from 1GB to 4GB and our MX server from 2GB to 5GB. Below are the dmesg memory findings and, yes, I get the memory over 4GB ignored when booting up. The ESMTP even says that about 130MB is ignored. I was reading about building into the kernel PAE options for using above 4GB of memory, but in the dmesg I see PAE in the Features. Does this mean the support is there and I just need some BIOS tweaking? Nope. This means that your CPU supports PAE, but says nothing about the operating system itself (whether it uses PAE or not). When you want a PAE-enabled kernel (i.e., one that uses PAE to see the extra memory), see the PAE kernel configuration in the sys/i386/conf directory of your sources tree, and build your own kernel with (for example, if you don't want to customize the kernel configuration): make kernconf=PAE buildworld buildkernel installkernel This builds a kernel which actually uses that interface to see the extra memory and allows you to access it in standard i386 mode. Generally, it's considered better practise to use the AMD64 architecture to access the high memory (because of performance considerations and driver compatability), but I don't know whether your CPUs actually support the x64 operating mode, so you may be stuck with using PAE. YMMV. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: threading and dlopen()
Am Dienstag, 18. Dezember 2007 21:34:33 schrieb Markus Hoenicka: My (limited) analysis makes me think this is some sort of a threading issue aggravated by the fact that the code is dlopen()ed (remember the same code works ok if compiled into a standalone app). BTW the firebird client library is the only library supported by libdbi which uses threads. All other drivers do not use threads and work ok. Have you tried compiling your program with gcc -fpic -pthread ... ? I don't have any more insight into this problem, at least as I'm not using dbi and as such am not able to reproduce it, but I'd guess that if your program doesn't conform to the platform's required thread semantics (which are turned on by -fpic -pthread) but uses code that does require this, you're bound for trouble. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Dependencies. (was: Yikes! FreeBSD samba-3.0.26a_2, 1 is forbidden: Remote Code Execution...)
Am Montag, 17. Dezember 2007 11:29:01 schrieb Ted Mittelstaedt: For you to ask that question shows without a doubt that it has been too long since you have sat back, put on Pink Floyd, taken a few bong hits, and contemplated the Universe. Thanks for cheering up my workday! ;-) -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: (postfix) SPAM filter?
Am Samstag, 15. Dezember 2007 14:48:35 schrieb Jorn Argelo: snip Also I believe that rejecting e-mail is a big point of discussion. We had an internet e-mail environment built about 3 years ago, and there the users were terrorized by spam. We had some users getting 30 spam mails a day at least. This setup was running amavis, spamassassin, postfix, postgrey, dcc and razor. Unfortunately, over time the bayes filter got incorrectly trained, and it sometimes rejected valid e-mails. If there's something you DON'T want to happen it's that. And also troubleshooting those kind of things can be quite hard ... Neither of the two packages I recommended are anything close to bayesian filtering, as they don't actually take measure on the content of the mail (which isn't available anyway when the corresponding rules are effective in the Postfix restriction mechanism), but rather on the conditions the mail is received under. This is what makes them (much more) lightweight (than for example a full statistical or bayesian filter) in the first place. I've not had a single false positive which wasn't explained with incorrect or plain invalid mailserver configuration on the sender side so far with these two packages, and the possibility of a false negative in our current environment is something close to 1%, at least according to my mailbox (which gets publicized enough by posting to @freebsd.org addresses). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Suggestions please for what POP or IMAP servers to use
Am Freitag, 14. Dezember 2007 16:27:42 schrieb RW: On Thu, 13 Dec 2007 21:06:25 -0800 Ted Mittelstaedt [EMAIL PROTECTED] wrote: Consider also that the majority of webinterfaces to mailservers are written using the uw-c-client imap libraries. So you go ahead and install dovecot - then watch when you install a webinterface the port manager sucking in the uw imap stuff anyway. Might as well run the uw imap server if your going to run the uw libraries. None of the major webmail clients appear to depend on cclient snip _The_ major webmail clients (Horde-IMP and SquirrelMail come to mind as the most used ones immediately) are written in PHP and require the IMAP extension for PHP (to do IMAP), which in turn depends on cclient, so basically the major webmail clients do depend on cclient (even though indirectly). Why the cclient dependency (for the IMAP extension of PHP) doesn't show up in your grepping of ports I don't know, but it's an easy check for you to test that the IMAP extension for PHP either comes with cclient bundled, or with a dependency on it that's slightly hidden in the Makefile. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Suggestions please for what POP or IMAP servers to use
Am Freitag, 14. Dezember 2007 23:14:32 schrieb Ted Mittelstaedt: As I said I did a survey of all known web clients earlier this year that did not require a specific server - I might have even posted it to the list. But I guess that's a challenge to some people to prove I don't know what I'm talking about. ;-) If you feel you must avoid c-client you can do it the following way: 1) The webmail that comes with SquirrelMail I would be surprised if it uses it - but, that webmail is inseparable from the SquirrelMail SMTP server and cannot be installed separately. I didn't test it because of that. Sorry to say this, but you do not know what you're talking about. SquirrelMail is a stand-alone webmail application, which has nothing to do and is not affiliated with any form of SMTP server. Check out SquirrelMail: http://www.squirrelmail.org/ Quoting from there: What is SquirrelMail? SquirrelMail is a standards-based webmail package written in PHP. It includes built-in pure PHP support for the IMAP and SMTP protocols, and all pages render in pure HTML 4.0 (with no JavaScript required) for maximum compatibility across browsers. It has very few requirements and is very easy to configure and install. SquirrelMail has all the functionality you would want from an email client, including strong MIME support, address books, and folder manipulation. As I explained earlier, SquirrelMail uses the PHP IMAP extension, which in turn uses cclient to access IMAP mailboxes, if you don't use the pure PHP IMAP implementation bundled with it (which I didn't know it had until rechecking their site just now; all the setups of SquirrelMail I did so far used the IMAP extension directly and there was a dependency on it earlier AFAIR). Pretty much the same thing goes for IMP (i.e., the Horde WebMail plugin); I'll save you the link to the page now, I guess you can use Google. Anyway, what you're probably referring to is the Courier webmail module (called somewhat similarly) SqWebMail (http://www.courier-mta.org/sqwebmail/), which really does not use cclient, as it accesses the mailboxes (in Maildir format) directly, but this comes at the price that the WebMail-server (and application) must have some form of read/write _filesystem access_ to all user's mailboxes being able to access the WebMail application, which generally is not what I as a responsible admin want to have; either, all mail accounts have to share the same UID/GID as the web application, or the web application requires some form of mod_suid functionality, which is not okay in either case. As I said earlier, it's a felt fact (I have no hard evidence to support this) that SquirrelMail and IMP are the most commonly used and installed WebMail applications out in the wild, and you'll find almost no mail-server administrator who hasn't heard of these two. And both of them (can) use cclient indirectly through PHP, and at least until the last time I set up a mail-server with IMP (which is around a year ago) didn't have a pure PHP implementation of the IMAP protocol. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: performance impact of large /etc/hosts files
Am Mittwoch, 12. Dezember 2007 13:01:14 schrieb Alex Zbyslaw: snip explanation I don't see how a firewall is appropriate for this (hosts.allow, likewise). The point of the exercise is to never even contact the ad host. Transparent proxy with squid on the firewall? There's even plugins to manage exactly this kind of ad-blocking with squid; although I don't currently know the extension's name. This is pretty much going to be your only option to do this in a centralized fashion. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: performance impact of large /etc/hosts files
Am Mittwoch, 12. Dezember 2007 13:38:59 schrieben Sie: I want to do precisely the opposite. It should affect only a single machine. It would even be better if it would affect only a single account on that machine. Affecting only a single machine/a single account has nothing to do with the fact that you manage and implement it centrally; the two concepts are orthogonal. Basically, this should come around to giving squid (from what I'd do in your case) different rule sets based on authentication to the proxy and/or originating IP in your internal network, which leads to different behaviour depending on the accessing person/program. Basically, why I personally rather like the squid (i.e., proxy-based) approach to ad-blocking is the fact that if you try to do this at a lower level than the HTTP-level, there's bound to be pages that display wrong/broken, simply because not being able to fetch images (because they supposedly come from localhost) means that most browsers are not going to display the space reserved to it and will mess up the page layout, even when specifying width= _and_ height= in an img-tag (when only specifying one of the attributes or none, the page layout will be broken anyway). Opera is my favourite candidate for messing up page layouts in this case. On another note, Opera has an (IMHO) huge timeout for failed (i.e., refused, not timed out) connections to the target host, and if many images refer to localhost through some DNS or hosts magic, this is going to majorly slow down page display/buildup on non-css based layouts, which sadly there still are enough out there (and for some of which the ad-slots are an integral part of the page layout, such as some german news sites). If you do the blocking at the topmost level (i.e., through squid or some other HTTP proxy), the proxy can generate an empty/transparent image with the appropriate proportions to fill the now void space, which the extension I referenced earlier will do automatically for you. This doesn't stop the connection to the ad host from happening (i.e., isn't a traffic saver, but who cares about that nowadays I'd say), but it does stop the end-user from seeing the ad (and/or its content). It even allows you more fine-grained control over which URLs to block, so that you don't have to filter by host specifically, but might also filter by directory (which is required at some sites, as the ads/unwanted content comes from the same host as the actual content you're interested in). It's a matter of choice how much duress you want the end-user to endure, basically, seeing that user-based discrimination on a proxy also requires authentication (unless you implement packet redirects on the end-user machines to different ports of the firewall depending on the user originating the outgoing packet, but this is just as bad to keep synchronized in the end). But, anyway, it would be my way to go to achieve what you're trying to do efficiently. Just my 5 (Euro)-cents. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: RELENG_7 and diablo-jdk
Am Mittwoch, 12. Dezember 2007 11:06:13 schrieb Daniel Molina Wegener: ¿Is there any problem if I run diablo-jdk-1.5_07 under RELENG_7? I mean, ¿is the diablo-jdk binary compatible with RELENG_7? Yes, there are/were quite some problems (which may not become immediately apparent with standard use but will as soon as you use Java software such as the sun-wtk). Generally, you'll want to build the sun-jdks on RELENG_7, using the diablo-jdk as a bootstapper and removing it after at least one other jdk has been installed. Instructions for downloading the sources and BSD-patches for the sun-jdks are in ports (i.e., cd /usr/ports/java/jdk1x; make will tell you what to do). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: performance impact of large /etc/hosts files
Am Donnerstag, 13. Dezember 2007 06:52:41 schrieb Gary Kline: well, thi sounded great until I read squid. Isn't that something to do with FBSD and Windows? If not, how hard is squid to install; what does it do? You're probably thinking of samba, which is an implementation of the SMB protocol (server-side) for *nix-systems. The operating system using SMB as client is most probably Windows in case you set up a samba server. squid is an HTTP-proxy. Something completely different. And setting it up (at least with a default configuration, which you'll have to adapt) is simply installing the port and starting it. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: RELENG_7 and diablo-jdk
Am Mittwoch, 12. Dezember 2007 22:15:00 schrieb Tino Engel: for me, java apps always segfault under releng_7. They never did under releng_6. Have not found out yet why.. The JDK's hotspot compiler digs pretty deep into the system to compile Java code to machine code and run that dynamically. Because of the new operating system version (and changes it introduced), this simply doesn't work properly anymore without a recompile of the JDK for the current system (I haven't dug deeper into the actual cause of the brokenness yet, but the probable cause I could think of is some changes in the kernel system call interface between RELENG_6 and _7, which the JDK uses without going through libc as a wrapper shin which would hide the changes). The workaround is simply to install one of the Sun JDKs from sources directly, using the Diablo JDK only to get a working XSLT-processor (which comes bundled with any JDK and doesn't cause the Diablo JDK to segfault when run), which is required in the bootstrapping process of the compilation of a JDK. After building and installing one of the Sun JDKs, you're free to remove the Diablo JDK; the functionality of the two is equal (AFAICT). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: (postfix) SPAM filter?
Am Donnerstag, 13. Dezember 2007 03:12:53 schrieb Chuck Swiger: Install the following: /usr/ports/mail/postfix-policyd-weight /usr/ports/mail/postgrey Just as an added suggestion: these two (very!) lightweight packages suffice to keep SPAM out of our company pretty much completely. Both are best used to reject mails before they even have to be delivered (in Postfix, this is a sender or recipient restriction, see the websites of the two projects for more details on how to set them up), so as a added bonus, people don't have to scroll through endless lists of mails marked as ***SPAM***. I've had a setup with amavisd-new, spamassassin and clamav on another mail server (basically the same thing Chuck described), but for our current usage, these two are efficient enough not to warrant the upgrade to more powerful hardware (which would be required to run SpamAssassin properly). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FreeBSD GSM Bluetooth Phone
Am Dienstag, 4. Dezember 2007 08:34:11 schrieb Cy Schubert: Could anyone point me in the direction of documentation outlining how to setup a Bluetooth phone for wireless Internet access (when WiFi is unavailable). Thanks. Depends on the protocol your phone uses to access the net. For PAN connectivity (which is the default Bluetooth way of Internet connectivity), FreeBSD currently doesn't ship with a daemon that implements the server-side of it. I implemented a quick 'n dirty hack implementing the PAN protocol which works fine with my Sony Ericsson (M600i) mobile, but YMMV when getting that to run/work with different phones: http://btpand.beenic.net You'll have to get a mercurial client to check it out, and read the README contained in the archive to get it to run (requires tap support in the kernel and needs you to set up the bridging/routing to get the traffic from the tap device to your local network). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ECCN# of the freeBSD V6.1
Am Dienstag, 4. Dezember 2007 15:30:09 schrieb [EMAIL PROTECTED]: We would like to export a personal computer which FreeBSD Ver6.1 was installed in from Japan. Could you tell me the ECCN# of this software? Uh, FreeBSD has an ECCN? I'd wonder. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Broadcom
Am Donnerstag, 29. November 2007 18:52:06 schrieb Miguel Alcántara: Grettings to this list. Well, I have a doubt about Broadcom HOT_TOPIC and FBSD 6.2 Good for you. What's the question? -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: 2nd try : tap SIOCIFCREATE failure
Am Mittwoch, 28. November 2007 15:00:35 schrieb Alain G. Fabry: FreeBSD# uname -a FreeBSD FreeBSD 6.2-RELEASE FreeBSD# kldstat Id Refs AddressSize Name 1 11 0xc040 6f7554 kernel 21 0xc0af8000 140c0snd_hda.ko 32 0xc0b0d000 479a8sound.ko 41 0xc0b55000 1d278kqemu.ko 51 0xc0b73000 8ea4 aio.ko 61 0xc4f44000 9000 if_bridge.ko 71 0xc5079000 16000linux.ko 81 0xc60ce000 4000 if_tap.ko FreeBSD# ifconfig tap0 create ifconfig: SIOCIFCREATE: Invalid argument Try: ifconfig tap create -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
OpenOffice.org 2.3.0_1 on 7.0 - unable to load/save to files
Hey all! I've come across a situation with my installation of openoffice.org-2.3.0, which basically makes the package/program unusable for me. Because it probably is a problem with my installation, and not with the package itself, I thought I'd post here first before opening a PR for it, as I guess that some other people than me are trying to run it on 7.0-STABLE (and can do so properly, because I haven't seen a single note of this problem on questions@ before). Anyway, here goes the error description. Whenever I start openoffice, and try to load from a previously saved file, or write new text, and try to save that to a file, the soffice.bin process will start the respective operation and display a progress bar at the bottom of the screen to show it is doing something, but as soon as the progress bar disappears (i.e., the operation finishes), the OpenOffice.org process is hung, using maximum CPU. The process will not do any more screen redraws, but is stopable using a SIGTERM (i.e., I do not have to resort to SIGKILL to get it to quit). When this condition appears, I see the following output on the console I started openoffice.org in (exactly at the moment the program becomes unresponsive): --- [EMAIL PROTECTED] ~]$ openoffice.org-2.3.0 I18N: Operating system doesn't support locale en_US (process:1499): GLib-GObject-CRITICAL **: gtype.c:2242: initialization assertion failed, use IA__g_type_init() prior to this function (process:1499): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed (process:1499): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed --- This output hinted me to attach to the process using gdb, and to check which of the threads of soffice.bin was using the CPU, and it seems that the GUI-thread is the one responsible: --- (gdb) thread 6 [Switching to thread 6 (Thread 0x29d01100 (LWP 100120))]#0 0x2d72e250 in g_once_init_enter_impl () from /usr/local/lib/libglib-2.0.so.0 (gdb) back #0 0x2d72e250 in g_once_init_enter_impl () from /usr/local/lib/libglib-2.0.so.0 #1 0x2d33861d in gtk_recent_manager_get_type () from /usr/local/lib/libgtk-x11-2.0.so.0 #2 0x2d338fec in gtk_recent_manager_add_item () from /usr/local/lib/libgtk-x11-2.0.so.0 #3 0x2c73d14a in SystemShell::AddToRecentDocumentList () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #4 0x2c62d143 in SfxObjectShell::DoLoad () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #5 0x2c666ce6 in SfxBaseModel::load () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #6 0x2c682f65 in SfxDispatcher::IsActive () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #7 0x2cb30a89 in component_writeInfo () from /usr/local/openoffice.org-2.3.0/program/libfwk680fi.so #8 0x2cb30cdb in component_writeInfo () from /usr/local/openoffice.org-2.3.0/program/libfwk680fi.so #9 0x2cb313d4 in component_writeInfo () from /usr/local/openoffice.org-2.3.0/program/libfwk680fi.so #10 0x2ca7aaff in ?? () from /usr/local/openoffice.org-2.3.0/program/libfwk680fi.so #11 0x2c5a2031 in SfxApplication::DocAlreadyLoaded () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #12 0x2c6af3ad in SfxDispatcher::HideUI () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #13 0x2c6ada4d in SfxDispatcher::Execute () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #14 0x2c6ae14f in SfxDispatcher::Execute () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #15 0x2c6ae1eb in SfxDispatcher::Execute () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #16 0x2c5a04cd in SfxApplication::DocAlreadyLoaded () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #17 0x2c6af3ad in SfxDispatcher::HideUI () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #18 0x2c6ada4d in SfxDispatcher::Execute () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #19 0x2c6adbf2 in SfxDispatcher::Execute () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #20 0x2c59c521 in SfxApplication::IsA () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #21 0x2c6c9b89 in SvxSearchItem::QueryValue () from /usr/local/openoffice.org-2.3.0/program/libsfx680fi.so #22 0x2814174f in HelpEvent::HelpEvent () from /usr/local/openoffice.org-2.3.0/program/libvcl680fi.so #23 0x282bcbba in vcl::LazyDeletorWindow::~LazyDeletor () from /usr/local/openoffice.org-2.3.0/program/libvcl680fi.so #24 0x29c8a45f in X11SalFrame::Dispatch () from /usr/local/openoffice.org-2.3.0/program/libvclplug_gen680fi.so #25 0x29cb0c5d in SalDisplay::DispatchInternalEvent () from /usr/local/openoffice.org-2.3.0/program/libvclplug_gen680fi.so #26 0x29cb0c8d in SalX11Display::Yield () from /usr/local/openoffice.org-2.3.0/program/libvclplug_gen680fi.so #27 0x29cb02ab in SalX11Display::IsEvent () from /usr/local/openoffice.org-2.3.0/program/libvclplug_gen680fi.so #28 0x29cacd42 in
Re: python25 core dumps
Am Donnerstag, 15. November 2007 04:07:26 schrieb David J Brooks: Ok. Here's what gdb shows for a crash from Gramps (built with py-Gtk2): (gdb) back #0 0x29ea37fd in delete_aspell_speller () from /usr/local/lib/libaspell.so.16 #1 0x29e03b3d in gtkspell_set_language_internal () from /usr/local/lib/libgtkspell.so.0 #2 0x29e04084 in gtkspell_set_language () from /usr/local/lib/libgtkspell.so.0 #3 0x29af90ae in ?? () from /usr/local/lib/python2.5/site-packages/gtk-2.0/gtkspell.so #4 0x29cdf180 in ?? () #5 0x29d28ff4 in ?? () #6 0x in ?? () #7 0xbfbf5218 in ?? () #8 0xbfbf5220 in ?? () #9 0x29d284cc in ?? () #10 0x29af9681 in ?? () from /usr/local/lib/python2.5/site-packages/gtk-2.0/gtkspell.so #11 0x in ?? () #12 0x29d28ff4 in ?? () #13 0x28308080 in ?? () #14 0xbfbf53c8 in ?? () #15 0x080b131a in PyEval_EvalFrameEx () Previous frame identical to this frame (corrupt stack?) (gdb) This seems like a problem in libaspell; maybe you should simply try to reinstall the aspell port. See below for more info. For comparison, this is what a crash from eric4 (built with PyQt4) looks like: (gdb) back #0 0x29224448 in typeinfo name for sipQApplication () from /usr/local/lib/python2.5/site-packages/PyQt4/QtGui.so #1 0x29595531 in sm_performSaveYourself () from /usr/local/lib/libQtGui.so.4 #2 0x295956a1 in sm_saveYourselfCallback () from /usr/local/lib/libQtGui.so.4 #3 0x29aed10b in _SmcProcessMessage () from /usr/local/lib/libSM.so.6 #4 0x29afffa3 in IceProcessMessages () from /usr/local/lib/libICE.so.6 #5 0x2958f5c8 in QSmSocketReceiver::socketActivated () from /usr/local/lib/libQtGui.so.4 #6 0x2958f62f in QSmSocketReceiver::qt_metacall () from /usr/local/lib/libQtGui.so.4 #7 0x287bc15f in QMetaObject::activate () from /usr/local/lib/libQtCore.so.4 #8 0x287bc6d2 in QMetaObject::activate () from /usr/local/lib/libQtCore.so.4 #9 0x287d8b33 in QSocketNotifier::activated () from /usr/local/lib/libQtCore.so.4 #10 0x287c1e1f in QSocketNotifier::event () from /usr/local/lib/libQtCore.so.4 #11 0x295467bd in QApplicationPrivate::notify_helper () from /usr/local/lib/libQtGui.so.4 #12 0x2954c8fe in QApplication::notify () from /usr/local/lib/libQtGui.so.4 #13 0x291b4a13 in sipQApplication::notify () from /usr/local/lib/python2.5/site-packages/PyQt4/QtGui.so #14 0x287ab07b in QCoreApplication::notifyInternal () from /usr/local/lib/libQtCore.so.4 #15 0x287ccaf3 in socketNotifierSourceDispatch () from /usr/local/lib/libQtCore.so.4 #16 0x28852886 in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.0 #17 0x28855c02 in g_main_context_check () from /usr/local/lib/libglib-2.0.so.0 #18 0x28856185 in g_main_context_iteration () from /usr/local/lib/libglib-2.0.so.0 #19 0x287ccf78 in QEventDispatcherGlib::processEvents () from /usr/local/lib/libQtCore.so.4 #20 0x295bd965 in QGuiEventDispatcherGlib::processEvents () from /usr/local/lib/libQtGui.so.4 #21 0x287aac31 in QCoreApplication::processEvents () from /usr/local/lib/libQtCore.so.4 #22 0x28623966 in meth_QCoreApplication_processEvents () from /usr/local/lib/python2.5/site-packages/PyQt4/QtCore.so #23 0x080b131a in PyEval_EvalFrameEx () #24 0x080b1fab in PyEval_EvalFrameEx () #25 0x080b1fab in PyEval_EvalFrameEx () #26 0x080b2919 in PyEval_EvalCodeEx () #27 0x080b2a67 in PyEval_EvalCode () #28 0x080c9fc6 in Py_CompileString () #29 0x080ca070 in PyRun_FileExFlags () #30 0x080cb569 in PyRun_SimpleFileExFlags () #31 0x08056ef1 in Py_Main () #32 0x080563b5 in main () (gdb) This seems like a problem in qt4 (I don't think the problem is in PyQt), simply try reinstalling that, too (completely; qt4 is split into several ports and pkg_info | grep qt4 is your friend here). Generally, from what I interpret into the second backtrace, you upgraded from some 6 release to 7.0-BETA2, which (amongst other things) means that the C++ libraries have changed (because of a newer compiler, gcc 3.3 vs. 4.2). The compiler has also had changes introduced to the C++ type info descriptor layout (which I should think causes the segmentation fault in typeinfo name in the second backtrace), so that if you have a program that's linked against different versions of libstdc++ (PyQt is linked against that, just as qt4 is), you'll see behaviour like this. To check whether my hypothesis is correct, simply do an ldd on both a PyQt library, and a qt4 shared library (locations of both of which you can extract from the backtrace). If the version of libstdc++ is different, you didn't follow the upgrading procedure which explicitly states to recompile _all_ ports for the new system. Output should look something like this, anyway: [EMAIL PROTECTED] ~]$ ldd /usr/local/lib/libqt-mt.so.3 /usr/local/lib/libqt-mt.so.3: ... libstdc++.so.6 = /usr/lib/libstdc++.so.6 (0x28c4c000) ... [EMAIL PROTECTED] ~]$ where libstdc++.so.6 is the 7.0 variant, whereas a 6 system will show
ffmpeg demuxer library currently broken?
Hey all! Does anyone else have problems with the latest ffmpeg port (from Oct 20)? It crashes reliably for me transcoding any input to any output (I tested with avi and mp3 files). The backtrace in the core-dump is corrupt, but it seems that the problem lies somewhere in libavformat's demuxer library (but is format independent), which causes a segmentation fault. If anybody else is experiencing this, please write me a short mail, because I'll start investigating deeper under that circumstance (I need ffmpeg desperately for work, and simply downgraded to the previous port, which works fine, but still would like to have a fix for the current ffmpeg if it's not only my system that is causing this). Thanks for any info! -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RT256x PCMCIA card under 7.0-BETA2 (repost from [EMAIL PROTECTED], to get a broader audience)
Hi all! I just recently bought a RT2561C based (at least I think so) wireless card, which is also happily recognized by the ral-driver: ral0: Ralink Technology RT2561 mem 0x8800-0x88007fff irq 17 at device 0.0 on cardbus0 ral0: MAC/BBP RT2561C, RF RT2527 ral0: Ethernet address: 00:80:5a:51:23:53 ral0: [ITHREAD] As soon as I plug in the card and the netif script starts wpa_supplicant and dhclient, the laptop this is plugged into receives an interrupt storm on cbb0 (having 80% interrupt time), which leads to a noticeable slowdown of the whole system: phoenix# vmstat -i interrupt total rate irq1: atkbd09773 3 irq10: acpi0 729 0 irq14: ata017173 6 irq15: ata1 64 0 irq17: cbb0 cbb1+ 10408993 4217 irq18: pcm0 5753 2 irq19: sis0+ 33302 13 irq20: ohci0 207 0 irq21: ohci1 44261 17 irq23: ehci0 1 0 cpu0: timer 4926468 1996 Total 15446724 6258 phoenix# This snapshot was taken some time after I killed wpa_supplicant (when it had been up for about 10 seconds). When I manually start wpa_supplicant (with no stations in reach), there is no interrupt storm, but just normal activity with around 7-10 interrupts on cbb0 per second. I can also manually scan using the card (but ifconfig scan never finishes, but will show the stations in reach when doing an ifconfig list scan after ^C-ing the ifconfig scan), but cannot attach to any WPA access point in scanning-reach with wpa_supplicant (the only type of stations I have access to; I cannot test with WEP at the moment); enabling net.wlan.debug and net.wlan.0.debug also shows the scan taking place and the keys being set to the card, but nothing else from there. The card itself is a Conceptronic C54RC Version 2.0, which I guess explains the difference (in hardware) between the note in the manpage of ral(4) for this adapter and the actual hardware type it finds: Conceptronic C54RC RT2560 CardBus Anyway, doing a pciconv -lv leads to a different result than the actual driver reports, which is compatible with the hardware specification in the manpage: [EMAIL PROTECTED]:2:0:0:class=0x028000 card=0x3c231948 chip=0x03021814 rev=0x00 hdr=0x00 vendor = 'Ralink Technology, Corp' device = 'RT2525 2.4GHz transceiver + RT2560 MAC/BBP wireless a/b' class = network The kernel all of this runs under is a (slightly) modified GENERIC 7.0-BETA2 (from yesterday evening CET; an older 7.0-BETA2 didn't exhibit the interrupt storm behaviour, but was similar for the rest), with SMP disabled and SCHED_ULE instead of SCHED_4BSD. As debug.ral isn't available under the 7.0 ral-driver (which is referenced in the FreeBSD setup page http://damien.bergamini.free.fr/ral/ral-freebsd.html), I have no immediately obvious means of debugging what's actually happening when the interrupt storm takes place, and why the card won't attach to the AP even though the same wpa_supplicant config works using an ndis-wrapped driver for a different PCMCIA-card (Broadcom-based). Thanks for any hint you can give me! -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: FreeBSD cache memory allocation
Am Mittwoch, 14. November 2007 17:04:37 schrieb icantthinkofone: Ivan Voras wrote: icantthinkofone wrote: Someone I can't stand said this about FreeBSD. Though I know C, I don't know anything about it and would love to respond. [QUOTE]The kernel is really lacking some features. They need a method to set precise type of memory cache but BSD doesn't provide way to specify memory cache. For that reason MS has the beautiful MmAllocateContigousMemorySpecifyCache()[/QUOTE] Well, I know there's contigmalloc(9) in FreeBSD but you will get a better answer if you ask this question on [EMAIL PROTECTED] That's what I thought but not sure if they were equivalent. I'm not signed up over there but I will now. Thanks. That's not entirely true. MmAllocateContiguousMemorySpecifyCache does something that's currently not (easily) possible with FreeBSD, namely set up an MTRR entry (i.e. a specific caching state) specifically for the portion of contiguous memory being allocated (normally, the driver wants to set the memory to uncached if using this call). This is something that the NVIDIA driver development guys have wanted to have for a long time (for performance reasons) in the FreeBSD kernel, and there's someone developing a patch to implement this (AFAICT from reading some websites), but it doesn't seem like it's finished so far. Read up on the NVIDIA requirements to develop an accelerated graphics driver on AMD64 to get more details on this (there's a workaround on i386, but that depends on the specific system's pre-setup MTRR records from the BIOS; this one of the reasons there's an accelerated graphics driver for i386 and not for AMD64). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Socket programming question
Am Mittwoch, 14. November 2007 23:21:43 schrieb Andrew Falanga: My question has to do with how someone would find out if a call to socket(2) actually produced a socket. I know that the API works, I've programmed with it many times, but is there a way to find out if 's' returned by socket(2) is actually valid in whatever kernel structure it is stored? I understand that I may have the process entirely mixed up. But it seems to me that the socket is somehow known to the kernel and I should be able to query the kernel somehow and discover if it is valid. Let me know if my question doesn't make sense as worded and I'll try to explain myself better. Another question related to this one, would someone in this list know where the source code is, in the system source tree, for the select call? Sorry to say that, but it doesn't make sense as it's worded. The descriptor returned by socket(2) is valid if it's = 0 (that's the API contract for the socket(2) C function), and remains valid until the program ends (unless you close the descriptor with close(2) before your program terminates, in which case the descriptor first becomes invalid [i.e. EBADF], but might be reused later by another call to socket(2) or open(2), in which case the descriptor again becomes valid but is associated with another object and possibly also with another type of object [file/pipe vs. socket]). That's the API-contract that's specified in POSIX, and to which FreeBSD sticks. As an application programmer, you can (and have to) rely on this behaviour; any derivation from this is a kernel bug, and should be posted as a PR. Generally, the easy way to query whether a descriptor is valid is by simply calling the respective function you want to execute on it, and if that returns errno = EBADF, then you know that the descriptor is invalid. In case it returns something else, it just tells you that the descriptor is valid, but doesn't tell you whether the descriptor is really associated with what you think it is. But if you follow the flow of control in the program, you should be able to make out where the descriptor is created and how it's modified, and thus be able to deduce (under the condition that the kernel sticks to POSIX specifications) what the state of the descriptor is at the time of usage. Hope this helps! -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: python25 core dumps
Am Mittwoch, 14. November 2007 23:15:36 schrieb David J Brooks: Since upgrading to 7.0-BETA2 most of my python based programs fail with Segmentation fault: 11 (core dumped). It seems to be limited to gui based programs using Gtk or Qt. Any idea what's going on there? Hints on how to analyze the python.core files would be helpful too. Easy way to get info from the backtrace: gdb /usr/local/bin/python path to/python.core Then, enter the back command in the post-mortem debugging session and post the output here. Someone (maybe even me) should be able to give you a hint where to look further from there. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: install
Am Donnerstag, 8. November 2007 17:09:06 schrieb Leonard Lilla: snip lots of whining Sorry if my reply seems elitist, but if you really think the installation is that bad, now is the perfect chance and time for you to become involved with FreeBSD by making it better. If you can't or won't do that, please stop complaining, and for your own good, move on. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: install
Am Donnerstag, 8. November 2007 20:11:14 schrieben Sie: Wow, yeah sorry man... I did not even realize you guys were having a funding drive. Ouch, that sucks, probably not the support you were looking for. Just for the reference, do you actually know what Open Source really is? What its good sides are, and what the bad sides are? Basically, even in open source software (like FreeBSD), you get nothing for free. Either: 1) you need it so badly that you do it yourself or pay someone else to do it for you, or 2) you _kindly_ ask other people to do it for you _for free_ (always remember that!) by giving constructive feedback and them implementing it with taking your feedback into account because they need it/want to implement it anyway, but 3) that simply doesn't work in the rant(ish) kind of way you gave feedback. In the second case, you're not guaranteed that anybody will actually take the time to implement what you would like to see in the system, because they may (and most probably will) have a completely different prioritization of the multitude of open things to take into consideration in building a functional and stable operating system. But I have heard some great things about FreeBSD as a server. Now I saw that there was a 'dummy downed' version and I thought I would give it a go. And man, that was not pleasant. Sure, fine, it wasn't pleasant for you. We've heard that now. I personally couldn't care less (and wouldn't be a volunteer to take on any form of redesign of the installer), because I had absolutely no problems with the installation process when I first installed FreeBSD about half a year ago _after reading the manual_ (yes, I'm a sort of freshman to *BSD too) and neither for the multitude of times since then (well, to be fair: I didn't go the 2-CD-way yet, I always did a net-install). I switched to FreeBSD because of licensing issues with the Bluetooth stack of Linux (and especially the BlueZ-userland, because every, even the basic system headers, are licensed under the GPL), because I develop, amongst other development for the mobile segment, commercial Bluetooth applications as a day-job, and for me it's most certainly not the installer that's a concern, but the Bluetooth subsystem. Guess what would happen if I were to beg the Bluetooth maintainer of FreeBSD at every turn to implement functionality I need (or to fix that which is partially broken or incomplete in FreeBSD [sorry Maksim, if you're reading this, I most certainly don't mean to belittle your work on the BT stack by this, but I'm talking about missing SCO support and such]), or would simply whine on the list about how FreeBSD is so utterly bad because its Bluetooth support isn't as enhanced as the Linux one: noone else would react positively to my whining either, because most probably they don't need it. Anyway, after having the first and second look at the system (because of FreeBSD's much more liberal licensing) and evaluating whether it was sensible to build on that which was already finished, I sat down and started to implement my additional requirements, and after some time even switched my desktop to FreeBSD (from Gentoo, which I was the ultimate fanboy of before that for quite some time), because I was starting to like it. All of my tweaking is possible because FreeBSD is open source, but with it comes the price of having to lay hands on the system in case I'm not satisfied with it. If the second look at FreeBSD would've turned out to discourage me from going further, I would've most certainly turned away, and I guess noone on the list would've shed a tear even if I'd have written a mail like yours giving people the hard goodbye. And, just to get back to what I wrote in the last mail: if you're not happy with FreeBSD, do yourself a favor and turn away. And do it with dignity. But if you decide to stay, be welcome, but if you feel something needs fixing, don't whine about it, but take it in your own hands. By the multitude of ways you can do so (PR, anyone?). If I may help you ask? Sure. I would suggest the team working on the UI for the install to think about their action following a condition a little better. That would not result in the user not having to find themselves in frustrating situations like the one I was in. Being that I chose various port options. At the end the install shows a list to review, containing categories and sub categories. After all selection is complete and install is in progress, I was prompted for CD one as if it needed the info for the categories list, and then it would ask for CD two to acquire the info for each subcategory. Just have them create a list kept in memory with all port requirements and build port install from CD2 using list from CD1 in memory. I don't know that much about programming, but I do believe that you must be able to do that, right? So it seems you do know something about programming and
Totally OT math question about projections
Hi all! I can't think straight anymore (it's a little too late), that's why I decided to post here, and maybe someone knows the answer before I'll dig my way through my uni maths books tomorrow. Just think of it as a brainteaser if you feel compelled to answer. ;-) Anyway, here we go: I have a photography of an object, which I need to process to calculate the relative width of an object based on the projection on the photographic 2D surface. I decided to go with the Zentralprojektion model (sorry, I don't know the english name, most probably that's the vanishing point projection, but I'm not sure), and arrived at the following sum to get an (increasingly better with increasing n) upper bound on the (relative) width of the projected range 0 = xs = xe (both taken from the left side of the image), when the vanishing point is projected at xv xe from the left of the image: d = ( xe - xs ) / n relwidth = sum(i=0,n)[ d / ( 1 - ( xs + i * d ) / xv ) ] Relative width meaning that for xs and xe close to 0, the relative width is close to xe - xs, whereas moving right in the direction of xv it rapidly increases (probably exponentially, but I didn't check yet). Just to make a small (ascii) picture of the variables involved: xe +|-+ + \ | + + \| + +\ + +|\+ +| \ + + |*| /| + + |*|/ | + + | / | + + |/ | + + /| + + /|| + +--||--+ 0 xs xv * being the object to measure. What I'm now looking for is the limit with n - infinity of that sum, not because I couldn't live with an upper bound, but rather because I have to implement this (for the biggest part) in integer math, which is pretty close to impossible with the sum given above. Anyway, if anybody can nudge me in the right direction where to look for the limit of this specific type of sum, I'll be immensely grateful! Thanks in advance! -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Totally OT math question about projections
Am Dienstag, 6. November 2007 21:15:04 schrieb Heiko Wundram (Beenic): snip Forget my question; I solved it myself just now. I just had to remember how integral substitution worked. Thanks anyway if you already got busy on this! -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Live video streaming on FreeBSD?
Am Donnerstag, 25. Oktober 2007 08:42:31 schrieb Andreas Widerøe Andersen: Does any of these streaming solutions (encoders or servers) require me to run a GUI on my FreeBSD boxes or can I simply run them like I always do: command line only? Apple's Darwin runs perfectly just with command-line (and has a Web-GUI, but that's not necessary for standard operation and configuration), but isn't compilable on AMD64 (because the programmers didn't think highly of portability when implementing it, i.e. assuming that a unsigned long is always 32-bit, and such), and I haven't tested whether it compiles on FreeBSD at all (all of our deployment boxes of Darwin are Linux-systems). Other than that, it's a pretty stable and mature streaming solution if you're willing to stream MP4 over RTSP (which on Windows requires QuickTime; MediaPlayer can't handle this out of the box). If you need a precompiled binary Linux-package for i386 (which should run without much hassle concerning required dependencies), send me a mail. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: rename file based on file's timestamp
Am Mittwoch, 24. Oktober 2007 14:45:08 schrieb andrew clarke: Now I want to rename these so the new filenames are based on the file's timestamp, like so: -rw-r--r-- 1 ozzmosis ozzmosis 115201253 Jul 28 2006 2006-07-28.mp3 -rw-r--r-- 1 ozzmosis ozzmosis 115201253 Jul 31 2006 2006-07-31.mp3 -rw-r--r-- 1 ozzmosis ozzmosis 115201253 Aug 1 2006 2006-08-01.mp3 -rw-r--r-- 1 ozzmosis ozzmosis 115201253 Aug 2 2006 2006-08-02.mp3 -rw-r--r-- 1 ozzmosis ozzmosis 115201253 Aug 3 2006 2006-08-03.mp3 I can write some Python code to do this, but maybe there is another way, perhaps using a shell script. Any thoughts? Simple bash script to do this (untested): for i in $* do mv $i `stat -f %Sm -t %Y-%m-%d`.mp3 done HTH! -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Writing Flash Driver
Am Mittwoch, 24. Oktober 2007 14:47:56 schrieb icantthinkofone: Does that in any way answer the question? Yes, because gnash is an open-source (re)implementation of Flash Player, compatible with a large part of the Flash7 specification, so that you don't need Adobe's player to play Flash format multimedia files. Did you actually check out (i.e., visit _and_ read) the gnash website, if you're asking this? By the way, this has nothing to do with drivers; Flash is a data-container format, which requires a program (knowing the specification, which is sort-of-open, with the emphasis lying on sort-of, not open, for Flash) to interpret, not a device. The word driver is reserved for software providing access to the latter (at least in my vocabulary), or at least something happening in kernel-space. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Mentor for C self study wanted
Am Dienstag, 23. Oktober 2007 23:24:09 schrieb Harald Schmalzbauer: #include stdio.h void main() { short nnote; // Numerischen Notenwert einlesen printf(Bitte numerischen Schulnotenwert eingeben: ); scanf(%d,nnote); man 3 scanf (most important thing to look at with any such problem is the C-library documentation, which is excellent on FreeBSD) says that for %d the passed pointer has to be a pointer to integer, which nnote is not. nnote is a pointer to short, which points to 2 bytes, whereas a pointer to integer is a pointer to 4 bytes of storage. Generally, nnote is reserved by the compiler on the stack (as it's a local variable) with two bytes (but this depends on your platform), and nnote points to the beginning of this area. As you are probably running on a little-endian architecture, the layout that scanf presumes is (from low to high): --- increasing addresses lsbyte 2 3 msbyte ^ |-- nnote points here of which only the first two are interpreted as nnote by the rest of the program; the upper two are different stack content (probably a return address to the C initialization code calling main(), or a pushed stack pointer, or such, as your procedure defines no other locals, see below). Now, when scanf assigns the four bytes, it'll properly enter the lower two bytes of the integer into lsbyte 2 (which is nnote, in the same byte order), but overwrite two bytes that are above it. When main() finishes, the (now broken) saved address (of which 3 msbyte is the lower half) is popped, which leads to the SIGSEGV you're seeing. In case you were on big-endian, the result would be different (i.e., the order would be reversed, so that nnote would always be zero or minus one in case you entered small integral values in terms of absolute value), but effectively, the return address would be overwritten as well, breaking it. This is effectively what can be called a buffer-overflow. Just to finish this: the proper format would be %hd, for which the flag h signifies that the pointer is a pointer to a short int, also documented in man 3 scanf. Why aren't you seeing this behaviour with printf (i.e., why can you pass a short but still specify %d)? Because C defines that functions that take a variable number of arguments (of which printf is one such) get each argument as type long (the type that's at least as big as a pointer on the current platform), so when passing a short as argument to a var-args function, the C-compiler inserts code which makes sure that the value is promoted to a long in the argument stack for printf. scanf is also a varargs function, but you're not passing the value of nnote, but rather a pointer to it, which (should) already be as wide as a long. Finally, looking at (parts of) the assembly that gcc generates (on a little-endian i386 machine): .globl main .type main, @function main: leal4(%esp), %ecx andl$-16, %esp pushl -4(%ecx) pushl %ebp ; Set up the pointer to the local frame (EBP on i386). All locals are ; relative to EBP in a function. movl%esp, %ebp ; ECX is the first (hidden) local. pushl %ecx subl$20, %esp subl$12, %esp pushl $.LC0 callprintf addl$16, %esp subl$8, %esp ; Load the effective address of EBP-6, i.e., nnote, into EAX, which ; is pushed for scanf. scanf will thus write its output on EBP-6 up to ; EBP-3, where EBP-4 and EBP-3 are part of the value that's been ; pushed in the pushl %ecx above. leal-6(%ebp), %eax pushl %eax pushl $.LC1 callscanf ... ; Restore the value at EBP-4 (i.e., the ECX that was pushed above) into ; ECX at function exit. This value has been corrupted by the integer ; assignment due to scanf. movl-4(%ebp), %ecx leave ; Restore the stack pointer from the (invalidated) %ecx, i.e. produce a ; bogus stack pointer. leal-4(%ecx), %esp ret This produces a segfault, after the return to the C initialization code, simply because the stack pointer is totally bogus. P.S.: I found that declaring nnote as int soleves my problem, but I couldnÄt understand why. Everything clear now? ;-) -- Heiko Wundram Product Application Development - Office Germany - EXPO PARK HANNOVER Beenic Networks GmbH Mailänder Straße 2 30539 Hannover Fon+49 511 / 590 935 - 15 Fax+49 511 / 590 935 - 29 Mobil +49 172 / 437 3 734 Mail [EMAIL PROTECTED] Beenic Networks GmbH - Sitz der Gesellschaft: Hannover Geschäftsführer: Jorge Delgado Registernummer: HRB 61869 Registergericht: Amtsgericht Hannover ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: BASH as root shell (static linking)
Am Samstag 06 Oktober 2007 07:25:39 schrieb Old Ranger: BASH is not a UNIX shell. BASH occurred with Linux then carried over into FreeBSD. Get your history straight and read up on the heritage of the bash on gnu.org, please. BEFORE you start making absurd comments like these. (as if the bash was written FOR Linux...?) -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Python24 problem
Am Donnerstag 04 Oktober 2007 08:20:37 schrieb dhaneshk k: Hi , I have a FreeBSD6.2 server machine. Here I tried to install python2.4 as follows #cd /usr/ports/lang/python24 #make install clean It seems you're using the tcsh; try rehash after the install to be able to start python (and try the name python24, which should give you 2.4; the name python is always bound to the current python). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Managing very large files
Am Donnerstag 04 Oktober 2007 14:43:31 schrieb Steve Bertrand: Is there any way to accomplish this, preferably with the ability to incrementally name each newly created file? man 1 split (esp. -l) -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: What is affected by FreeBSD-SA-07:08.openssl ?
Am Donnerstag 04 Oktober 2007 15:53:28 schrieb Alexandre Biancalana: snip Doesn't revel much about what is affected by this bug Have someone made some deeper analysis about what is affected ? Apache (i.e. mod_ssl) is affected by this. That's what makes the patch important. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ffmpeg not installing
Am Donnerstag 04 Oktober 2007 21:01:26 schrieb James: Do you folks have any ideas on this one? I was attempting a make deinstall make reinstall to see if that would overcome it at the time. Have you tried a make clean in between? i.e., are you still using the broken work-directory? That'd be my first guess. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Managing very large files
Am Donnerstag 04 Oktober 2007 22:16:29 schrieb Steve Bertrand: This is what I am afraid of. Just out of curiosity, if I did try to read the entire file into a Perl variable all at once, would the box panic, or as the saying goes 'what could possibly go wrong'? Perl most certainly wouldn't make the box panic (at least I hope so :-)), but would barf and quit at some point in time when it can't allocate any more memory (because all memory is in use). Meanwhile, your swap would've filled up completely, and your box would've become totally unresponsive, which goes away instantly the second Perl is dead/quits. Try it. ;-) (at your own risk) -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: migrate from postfix to qmail
Am Montag 24 September 2007 15:24:09 schrieb David Benfell: And not that this is the first file system issue I've heard about with qmail, but what is an MTA doing that should be file system dependent in any way? I *am* a happy qmail user, but this is something I just don't get. It is filesystem dependent when a write to a filesystem actually becomes permanent (even when O_(D)SYNC is specified in the open syscall, that just makes sure the file data is committed immediately to disk), in the sense that if you switch off the power without syncing, that after filesystem reconstruction on reboot the file is still there, with its contents. (think about delayed metadata-updates on FreeBSD UFS2, for example, ReiserFS has a similar kind of behaviour wrt. updating its B-tree) Only after this true commit has happened is the MTA actually able to give a proper 200 in reply to finishing the SMTP DATA-command, because it can be sure that the mail won't be lost under all normal circumstances (besides having the HD hardware fail, which generally isn't catered for by the MTA). Qmail simply doesn't check properly (in the case of ReiserFS) whether the file has been truly committed before it gives out the 200 reply, so basically, if you deploy ReiserFS (which is known to cache its B-tree aggressively) and have a power-outage while Qmail is writing the queue file to disk, you're at odds that the mail is lost simply because Qmail has already given out the 200 reply to the remote server, even though the file information hasn't been committed to the ReiserFS B-tree (or the journal) yet, so that the file won't be recreated during journal-replay. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: How to convert ASCII to Hexadecimal format?
Am Samstag 22 September 2007 09:19:02 schrieb ronggui: for example: ASCII: a test HEX : 61 20 74 65 73 74 A small Python script to do the same (in case you need more control, adapt it as it suits you). --- #!/usr/bin/python from sys import argv for c in .join(argv[1:]).decode(ascii): print hex(ord(c))[2:].upper(), --- [EMAIL PROTECTED] ~]$ python test.py this is a test 74 68 69 73 20 69 73 20 61 20 74 65 73 74 [EMAIL PROTECTED] ~]$ -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: migrate from postfix to qmail
Am Samstag 22 September 2007 15:48:55 schrieb Christian Baer: snip The qmail-configuration can be read an evaluated *without* a parcer. Sorry, but that's BS (IMHO). Any program interpreting some form of input is called a parser, and the only distinction is the algorithm you need, i.e. whether you need a full-blown stack-machine to interpret the input (think of recursive declarations), or not. The Postfix configuration (/usr/local/etc/postfix/main.cf) simply consists of directives of the form: varname = value where the value can have continuations by indenting the following line with whitespace, but that's about the only thing that's different to the INI-format (besides not having the concept of sections in a Postfix config file). Thus, the Postfix configuration should easily be parseable by about 20-30 lines of C code (with error checking), if you're not willing to use (f)lex to implement the simplistic parser for you. The only thing that makes life a little harder is the ability to reference other items in main.cf by using $itemname (which are basically pure string replacements); these have to be implemented in a semantic phase anyway, which doesn't have anything to do with the parser itself. Last, but not least, Postfix implements most of the actual logic of delivery (including virtual delivery) in so-called maps, which come as KEY whitespace+ VALUE newline files. I wouldn't know how much easier parsing could get for any form of control panel (if it doesn't use Postfix's ability to store a map in a RDBMS anyway). -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: switching between WAPs
Am Donnerstag 20 September 2007 04:47:03 schrieb C Thala: That OS from the NorthWestern US seems to keep a list of WAPs and will detect whenever you are in the vicinity of one and use the available one. How can I get FreeBSD to do the same? Try setting up a wpa_supplicant configuration (and putting WPA DHCP in rc.conf); that does the proximity-switching for you (and does so for me, happily). I don't really know whether wpa_supplicant works with non-security-enabled (i.e. non-WEP and non-WPA) wireless networks, but I guess there's a switch to tell it to do so. -- Heiko Wundram Product Application Development - Office Germany - EXPO PARK HANNOVER Beenic Networks GmbH Mailänder Straße 2 30539 Hannover Fon+49 511 / 590 935 - 15 Fax+49 511 / 590 935 - 29 Mail [EMAIL PROTECTED] Beenic Networks GmbH - Sitz der Gesellschaft: Hannover Geschäftsführer: Jorge Delgado Registernummer: HRB 61869 Registergericht: Amtsgericht Hannover ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: mail server setup questions
Am Mittwoch 05 September 2007 21:14:17 schrieb Predrag Punosevac: We have a exim at the University of Arizona and works really well (but I am just a user not a sysadmin). Me, personally, I can only swear by Postfix. I've set up numerous Postfix mail servers over the last two years, and I've never had trouble with them as to this date. Postfix is robust (I've never had an error condition that _lost_ mails, so far), (actually) pretty easy to configure in comparison to sendmail and (IMHO) exim, simply because the documentation is extensive and the directives are clear and concise for the main configuration (that's for the main.cf; master.cf, which dispatches the different parts that make up Postfix, is a different topic, but you needn't touch that under most circumstances), and it's easily extensible my its extensive use of the generic feature of maps for any lookups required for configuration options (a map can basically come from anything, such as get*ent, flat db files, relational databases, a socket protocol, and some other things which you'd possibly not even dreamed about). By using the Postfix mail filter APIs (completely different to milter, but milter is also possible AFAIK in Postfix 2.3+), I've hacked together a small Anti-Harvester plugin in an afternoon for the three big servers I administered, and there's tons of software out there that plugs in with Postfix to do things like greylisting, spam control, mail traffic accounting and rate limiting, and the like. The architecture of Postfix I'm talking about is called the policy framework. Thirdly, I don't recall a major security vulverability in Postfix for quite some time now (longer than from what I know of sendmail, anyway, but this might be my biased vision), and generally, you can expect Postfix to come preconfigured safe, unless you explicitly open it up (which isn't easy to do). On the other hand: besides trying sendmail some years back (I still have the O'Reilly sendmail book somewhere on my shelf), I've never tried a different mailer in a production environment yet, so the value of my answer may vary. I know most of my peers who deploy Debian in server environment swear by exim (I should guess because it comes preinstalled and is the default for them), but again, I recall the horror I faced when I had a look at the exim configuration of my uni when I had to change mail routing (because their exim mailserver got blacklisted, and had to route through one of the servers administered by me to be able to get out mails at all; that was a happy moment in my student admin career :-)). Anyway, have a look at Postfix, I can pretty much guarantee you that it'll suck you in! -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: ip address location database
Am Donnerstag 23 August 2007 11:42:00 schrieb David Banning: I am looking towards setting up something which will let me know what part of the world a specific ip address is from. Anyone know an easy process for this? Check out: http://www.maxmind.com/ Their free database is slightly less specific (and actual) than the paid database, but sufficient for pretty much all jobs I've had so far. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Ports patches? Where should I send them to?
I started hacking away at Python 2.5.1 in the ports distribution to implement HCI bluetooth socket handling for FreeBSD. As I've had my fair share of experience with the Python patching process, I'd rather see this patch go into the ports tree than to directly post it to upstream. Is there some place to send patches like this to to get to the package maintainer? -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: server was hacked
Am Samstag 11 August 2007 13:20:31 schrieb Brent: Im running FBSD 5.4 as a web server the server is behind a cisco firewall /router and the server has alot of CMS jumila / mambo sites on it. I noticed that when i ran sockstat i was seeing multiple IPs connected to high ports on the server with a process id of psybnc . Did some looking around found that this is a IRC relay program that was installed through a compromised mambo site. That was a know Mambo vulnerability which also hit a client of ours. It's not a root compromise, though, AFAIR. On FBSD how do you checksum binaries on the system to ensure someone hasnt replaced one with there own binary. Install security/tripwire and configure properly. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: X + WM != GUI? (Re: Convince me, please! - too much about GUI)
Am Freitag 10 August 2007 10:57:38 schrieb [EMAIL PROTECTED]: Wojciech Puchar [EMAIL PROTECTED] wrote: i don't use GUI. it takes a lot and gives nothing. i use both text and graphic (X) based apps and no gui. i use fvwm2 with my config, there are plenty of nice other wm's good for that. I am not following this. If (X.org + some WM) is not a GUI, how would you define He probably equates a desktop environment (such as KDE/Gnome/etc.) to a GUI. Which is wrong, of course: GUI is just any form of graphical user interface, which X fits nicely. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
www.freebsd.org down?
Is anybody else experiencing www.freebsd.org to be down? I just wanted to have a look at the online handbook, but couldn't get at it... -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: www.freebsd.org down?
Am Dienstag 07 August 2007 15:00:09 schrieb Heiko Wundram (Beenic): Is anybody else experiencing www.freebsd.org to be down? I just wanted to have a look at the online handbook, but couldn't get at it... Forget this. It's back up for me. -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: semi OT: sh scripting problem
Am Mittwoch 01 August 2007 16:35:44 schrieb Robert Huff: Is there a way within the script - or, failing that, by modifying FILE - to not break at the whitespace? If you're using bash, set IFS to the newline only before looping. I guess the tcsh also has a similar setting, but I wouldn't know where to look. --- IFS= for i in `cat file` do ... done --- HTH! -- Heiko Wundram Product Application Development ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: make buildworld fails on 6.2-STABLE
Am Donnerstag 26 Juli 2007 15:54:36 schrieb J.D. Bronson: internal compiler error: Segmentation fault: 11 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://gcc.gnu.org/bugs.html for instructions. Most probably a (physical) memory error. As the message says, this has pretty much nothing to do with the upping of world, but is an internal compiler error, which I've only seen on development snapshots of gcc (improbable that these are distributed with STABLE), or flaky memory (which is much more likely the cause). -- Heiko Wundram Product Application Development - Office Germany - EXPO PARK HANNOVER Beenic Networks GmbH Mailänder Straße 2 30539 Hannover Fon+49 511 / 590 935 - 15 Fax+49 511 / 590 935 - 29 Mail [EMAIL PROTECTED] Beenic Networks GmbH - Sitz der Gesellschaft: Hannover Geschäftsführer: Jorge Delgado Registernummer: HRB 61869 Registergericht: Amtsgericht Hannover ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: looking for a good mailing list manager
Am Dienstag 24 Juli 2007 10:04:47 schrieb Steven: Hi I am looking for a good Open source mailing list manager. Mailman? I can only recommend that. http://www.gnu.org/software/mailman/mailman.html -- Heiko Wundram Product Application Development - Office Germany - EXPO PARK HANNOVER Beenic Networks GmbH Mailänder Straße 2 30539 Hannover Fon+49 511 / 590 935 - 15 Fax+49 511 / 590 935 - 29 Mail [EMAIL PROTECTED] Beenic Networks GmbH - Sitz der Gesellschaft: Hannover Geschäftsführer: Jorge Delgado Registernummer: HRB 61869 Registergericht: Amtsgericht Hannover ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: bonnie++ aborts on NFS volume
On Tuesday 17 July 2007 08:09:48 Nico -telmich- Schottelius wrote: Anyone an idea why it aborts and how to fix? An idea why it aborts _could_ be the fact that the Linux (kernel) NFS-server (there's also a userland NFS server, but that's not widely used, so I presume this isn't the case for you) doesn't unlink files that are unlinked from remote immediately, but moves them to a temporary (.nfssomeid) name before finally truly unlinking them in case the file is still referenced by some NFS handle (i.e., opened at the remote end), thus causing the directory to not be empty, even though all files in it have actually been unlinked from the remote end. I don't know whether some performance/caching issues cause this, but as the temporary (seemingly) disappeared when bonnie++ was closed (and thus all file descriptors of bonnie among with any cache the OS kept freed), I'd guess in this direction. Again, this is just a wild guess, and I've never had problems running bonnie++ on a Linux Kernel-NFS-server exported filesystem, but from Linux NFS-clients, that is, which might (or rather, will probably) behave differently. -- Heiko Wundram Product Application Development - Office Germany - EXPO PARK HANNOVER Beenic Networks GmbH Mailänder Straße 2 30539 Hannover Fon+49 511 / 590 935 - 15 Fax+49 511 / 590 935 - 29 Mail [EMAIL PROTECTED] Beenic Networks GmbH - Sitz der Gesellschaft: Hannover Geschäftsführer: Jorge Delgado Registernummer: HRB 61869 Registergericht: Amtsgericht Hannover ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Transparent email proxy
On Monday 16 July 2007 09:05:56 Daniel Marsh wrote: I've never come across anyone using TLS+SMTP, in most cases I've found that SMTP is accepted as insecure (esp. over the Internet). If we were talking intra-company SMTP over the Internet, different story altogether due to the company needing privacy. Ahemm... That depends largely on the audience you're administering for... I personally have seen that many large (german) (free-)email providers are trying to force SMTP through TLS for sending out email through their servers at the moment, simply because they don't want passwords for logging in to their service transferred as plaintext (and thereby sniffable by the provider/network you're using). It's not so much about the mail (content) itself, it's more about the authentication that's required to relay. -- Heiko Wundram Product Application Development - Office Germany - EXPO PARK HANNOVER Beenic Networks GmbH Mailänder Straße 2 30539 Hannover Fon+49 511 / 590 935 - 15 Fax+49 511 / 590 935 - 29 Mail [EMAIL PROTECTED] Beenic Networks GmbH - Sitz der Gesellschaft: Hannover Geschäftsführer: Jorge Delgado Registernummer: HRB 61869 Registergericht: Amtsgericht Hannover ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Transparent email proxy
On Friday 13 July 2007 09:30:06 Olivier Nicole wrote: As an ISP, or the person in charge of a large organisation, have you ever set-up a transparent email redirection: all outgoing email would be proceeded to an outgoing server in order to check for virus, spam, whatever. Don't do this transparently. Only leads to pain and suffering (and sufficiently high client disappointment), especially if you want to support TLS over SMTP (which either means a failed certificate for the sending host in case you proxy fully), or not check-/controllable by you (in case you pass encrypted SMTP on directly). Easiest solution that worked for me: block all outgoing traffic to ports 25 and 465, and tell your clients to use yoursmtphost as their smarthost, which then accepts the mail, scans it, and sends it on properly. This works fine for a university of 8000 computers. ;-) -- Heiko Wundram Product Application Development - Office Germany - EXPO PARK HANNOVER Beenic Networks GmbH Mailänder Straße 2 30539 Hannover Fon+49 511 / 590 935 - 15 Fax+49 511 / 590 935 - 29 Mail [EMAIL PROTECTED] Beenic Networks GmbH - Sitz der Gesellschaft: Hannover Geschäftsführer: Jorge Delgado Registernummer: HRB 61869 Registergericht: Amtsgericht Hannover ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Some hosting weirdness...
On Wednesday 11 July 2007 14:19:09 Eric F Crist wrote: snip What should I look for? Is there possibly some weird caching issues at their ISPs? How can I fix this? Do a tcpdump when someone connects from their network and check for TCP-MSS issues, which would be my first guess when small files/items load fine over HTTP but items larger than a single TCP-packet won't (which basically fits the symptoms you describe). As some ISPs will do IP fragmentation when a packet too large to fit over the downlink to a customer arrives, you'll not see this problem with these. Those ISPs that don't do IP fragmentation on the downlink (quite a few) generally should send out an ICMP-message with a Fragmentation needed error (which appears in the tcpdump), but some don't do that either. Generally, the MSS in their SYN-packet when connecting to your webserver should be below 1460; most probably at 1452 (which is DSL and cable AFAIK), or more generally speaking (their) MTU-40, and the _IP_ packet size your host sends back should always be equal to or below the minimum of your MSS (which is sent in the SYN/ACK packet) and their MSS, plus 40. If this is not the case, you have an issue. -- Heiko Wundram Product Application Development - Office Germany - EXPO PARK HANNOVER Beenic Networks GmbH Mailänder Straße 2 30539 Hannover Fon+49 511 / 590 935 - 15 Fax+49 511 / 590 935 - 29 Mail [EMAIL PROTECTED] Beenic Networks GmbH - Sitz der Gesellschaft: Hannover Geschäftsführer: Jorge Delgado Registernummer: HRB 61869 Registergericht: Amtsgericht Hannover ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Some hosting weirdness...
On Wednesday 11 July 2007 20:14:59 Eric F Crist wrote: Well, I performed a tcpdump as you suggested, and my mss is exactly 1460, not the 1452 you suggest. What does this mean? As your servers uplink is (most probably) an Ethernet cable, your MSS is correct at 1460 (= 1500 bytes MTU for Ethernet - 40 bytes IP+TCP header). When a TCP connection is established, a three-way handshake takes place. The host opening the connection sends a SYN-packet which contains his Maximum Segment Size, in this case it's the customer opening a website on your server, and your host sends a confirmation SYN/ACK-packet to open your side of the two way connection, which contains your MSS. This makes two values for Maximum Segment Size (the remote one and yours), and the smaller one is chosen as the Maximum Segment Size of the connection, thus if the customer sends a SYN-packet with MSS of 1452 and you send back a SYN/ACK with MSS of 1460, the MSS for the connection is negotiated at 1452 (which both hosts should stick to). The following TCP dump of a connection request to a host (sadly a Linux box ;-)) should clear any confusion: [EMAIL PROTECTED]:/home/heiko# tcpdump -vv -i eth0 port 80 and host hnvr-4db2ebb3.pool.einsundeins.de tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes --- SYN packet from my dialup (MSS of 1452, I'm on DSL) 20:22:26.329522 IP (tos 0x0, ttl 52, id 8003, offset 0, flags [DF], proto: TCP (6), length: 64) hnvr-4db2ebb3.pool.einsundeins.de.64905 mail.beenic.net.www: S, cksum 0xd2b5 (correct), 1315765383:1315765383(0) win 65535 mss 1452,nop,wscale 0,nop,nop,timestamp 2442717 0,sackOK,eol --- --- SYN/ACK from server (MSS of 1460, is on 100Mbit Ethernet) 20:22:26.331590 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto: TCP (6), length: 44) mail.beenic.net.www hnvr-4db2ebb3.pool.einsundeins.de.64905: S, cksum 0x421a (correct), 1939516734:1939516734(0) ack 1315765384 win 5840 mss 1460 --- --- Some connection setup 20:22:26.395813 IP (tos 0x0, ttl 52, id 8004, offset 0, flags [DF], proto: TCP (6), length: 40) hnvr-4db2ebb3.pool.einsundeins.de.64905 mail.beenic.net.www: ., cksum 0x70a7 (correct), 1:1(0) ack 1 win 65535 20:22:26.402403 IP (tos 0x0, ttl 52, id 8005, offset 0, flags [DF], proto: TCP (6), length: 421) hnvr-4db2ebb3.pool.einsundeins.de.64905 mail.beenic.net.www: P 1:382(381) ack 1 win 65535 20:22:26.402414 IP (tos 0x0, ttl 64, id 58600, offset 0, flags [DF], proto: TCP (6), length: 40) mail.beenic.net.www hnvr-4db2ebb3.pool.einsundeins.de.64905: ., cksum 0x560a (correct), 1:1(0) ack 382 win 6432 --- --- Actual data packet (IP packet size is the smaller of the two MSS+40) 20:22:26.923728 IP (tos 0x0, ttl 64, id 58602, offset 0, flags [DF], proto: TCP (6), length: 1492) mail.beenic.net.www hnvr-4db2ebb3.pool.einsundeins.de.64905: . 1:1453(1452) ack 382 win 6432 --- --- Another data packet (again, smaller of the two MSS+40 bytes) 20:22:26.923739 IP (tos 0x0, ttl 64, id 58604, offset 0, flags [DF], proto: TCP (6), length: 1492) mail.beenic.net.www hnvr-4db2ebb3.pool.einsundeins.de.64905: . 1453:2905(1452) ack 382 win 6432 --- And so on and so forth... This output was grabbed while I was loading an HTML page from the server which is around 5kb large, which means that at least one TCP packet is filled up completely. Ping also makes it easy to spot this: [EMAIL PROTECTED]:/home/heiko# ping -s 1464 hnvr-4db2ebb3.pool.einsundeins.de PING hnvr-4db2ebb3.pool.einsundeins.de (77.178.235.179) 1464(1492) bytes of data. 1472 bytes from hnvr-4db2ebb3.pool.einsundeins.de (77.178.235.179): icmp_seq=1 ttl=53 time=193 ms 1472 bytes from hnvr-4db2ebb3.pool.einsundeins.de (77.178.235.179): icmp_seq=2 ttl=53 time=191 ms 1472 bytes from hnvr-4db2ebb3.pool.einsundeins.de (77.178.235.179): icmp_seq=3 ttl=53 time=188 ms 1472 bytes from hnvr-4db2ebb3.pool.einsundeins.de (77.178.235.179): icmp_seq=4 ttl=53 time=191 ms --- hnvr-4db2ebb3.pool.einsundeins.de ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3002ms rtt min/avg/max/mdev = 188.379/191.356/193.704/1.912 ms [EMAIL PROTECTED]:/home/heiko# 1464 ping bytes (making a total IP+ICMP packet size of 1492) fit through the pipe, but: [EMAIL PROTECTED]:/home/heiko# ping -s 1465 hnvr-4db2ebb3.pool.einsundeins.de PING hnvr-4db2ebb3.pool.einsundeins.de (77.178.235.179) 1465(1493) bytes of data. From rtsl-hnvr-de05.nw.mediaways.net (213.20.127.85) icmp_seq=1 Frag needed and DF set (mtu = 1492) 1473 bytes from hnvr-4db2ebb3.pool.einsundeins.de (77.178.235.179): icmp_seq=2 ttl=53 time=180 ms 1473 bytes from hnvr-4db2ebb3.pool.einsundeins.de (77.178.235.179): icmp_seq=3 ttl=53 time=179 ms 1473 bytes from hnvr-4db2ebb3.pool.einsundeins.de (77.178.235.179): icmp_seq=4 ttl=53 time=202 ms 1473 bytes from hnvr-4db2ebb3.pool.einsundeins.de (77.178.235.179): icmp_seq=5 ttl=53 time=198 ms 1473 bytes from hnvr-4db2ebb3.pool.einsundeins.de (77.178.235.179): icmp_seq=6