Re: sosend() and mbuf
> When you did kern_open() without creating kernel thread, it worked, > because kern_open() used file descriptor table from your current > (userland) process. In FreeBSD 7.x kthread_create() creates a process > without file descriptor table, so you can't use kern_open() and actually > you shouldn't do this either. I understood now. Thanks > Take a look at sys/cddl/compat/opensolaris/kern/opensolaris_kobj.c, > where you can find functions to do what you want. > > I guess you already considered doing all this in userland?:) I'm not deploying this http server for any production, i just want to study its performance compared to a userland http server. And to experience FreeBSD kernel hacking. I'm still trying to figure out, how to play with soreceive() now. But Thanks a lot, It's now clearer for me. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: sosend() and mbuf
Guys, Here is the code, just scroll down and change kthread_create2() to kthread_create() and it will crash NOTE: i'm still working on the socket part, u can commend it. Something wrong with proc0, and I can't figure it out khttp.c Description: Binary data ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: sosend() and mbuf
> kernel threads may not have a file descriptor table. > so kern_open may not work on kernel processes.. > (just speculating) But the module's main thread belogs to proc, why this process could use kern_open() and proc0 don't ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: sosend() and mbuf
OpenKETA has its own kthread_create() with a little modification from kthread_create(), it associates the new thread with curthread not with the thread0. See /usr/sys/kern/kern_kthread.c: kthread_create() error = fork1(&thread0, RFMEM | RFFDG | RFPROC | RFSTOPPED | flags, pages, &p2); OpenKETA:kthread_create() error = fork1(curthread, RFFDG | RFPROC | RFSTOPPED | flags, pages, &p2); I'll give it a try and see if it works. BUT i still can't understand why kern_open() don't work, except in the original thread. On Tue, Aug 4, 2009 at 9:59 AM, Maslan wrote: > yes kio http://people.freebsd.org/~pjd/misc/kernio/ > However, It's outdated. > > On Tue, Aug 4, 2009 at 9:56 AM, Ed Schouten wrote: >> * Maslan wrote: >>> > Is it possible to call kern_open() from within a kernel thread anyway? >>> I think yes, It worked on the parent thread before creating a new kthread. >>> See OpenKETA source, its using the same approach. >>> > kern_open() depends on a file descriptor table, right? >>> Yes, it returns a fd in the curthread->td_retval[0], which i should >>> use within the same thread to deal with this file. >> >> Didn't someone (Jeff Roberson?) develop some nice in-kernel API for >> accessing files some years ago? Why not use that? >> >> -- >> Ed Schouten >> WWW: http://80386.nl/ >> > ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: sosend() and mbuf
yes kio http://people.freebsd.org/~pjd/misc/kernio/ However, It's outdated. On Tue, Aug 4, 2009 at 9:56 AM, Ed Schouten wrote: > * Maslan wrote: >> > Is it possible to call kern_open() from within a kernel thread anyway? >> I think yes, It worked on the parent thread before creating a new kthread. >> See OpenKETA source, its using the same approach. >> > kern_open() depends on a file descriptor table, right? >> Yes, it returns a fd in the curthread->td_retval[0], which i should >> use within the same thread to deal with this file. > > Didn't someone (Jeff Roberson?) develop some nice in-kernel API for > accessing files some years ago? Why not use that? > > -- > Ed Schouten > WWW: http://80386.nl/ > ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: sosend() and mbuf
> Is it possible to call kern_open() from within a kernel thread anyway? I think yes, It worked on the parent thread before creating a new kthread. See OpenKETA source, its using the same approach. > kern_open() depends on a file descriptor table, right? Yes, it returns a fd in the curthread->td_retval[0], which i should use within the same thread to deal with this file. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: sosend() and mbuf
I'm getting crazy, I don't know why kern_open() works in the module's main thread, but when I use it in another thread created by kthread_create() it crashes the kernel ??? On Tue, Aug 4, 2009 at 9:30 AM, Ed Schouten wrote: > Hi, > > * Maslan wrote: >> man kthread says: >> The kthread_create() function is used to create a kernel thread. The new >> thread shares its address space with process 0, the swapper process, and > ^^^ >> runs in kernel mode only. >> >> However, when i checked the pid & tid of the new created thread it was >> not the same as the parent nor as the proc0 & thread0 > > I am not sure, but sharing another process's address space doesn't have > to imply it shares the same pid, right? > > -- > Ed Schouten > WWW: http://80386.nl/ > ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: sosend() and mbuf
man kthread says: The kthread_create() function is used to create a kernel thread. The new thread shares its address space with process 0, the swapper process, and runs in kernel mode only. However, when i checked the pid & tid of the new created thread it was not the same as the parent nor as the proc0 & thread0 simple printf() gives: swap procid=0, threadid=0 procid=1680, threadid=100089 procid=1681, threadid=100090 <--- created by kthread_create() 2009/8/3 Max Laier : > On Tuesday 04 August 2009 00:03:40 Dag-Erling Smørgrav wrote: >> Dag-Erling Smørgrav writes: >> > One thing that springs to mind is that kern_open() will dereference >> > td->td_proc, and AFAIK kthread_create() does not associate the thread >> > with a process. >> >> This is wrong, and contradicts what I wrote further down. Just ignore >> it. > > IIRC, kernel threads don't have root. > > -- > /"\ Best regards, | mla...@freebsd.org > \ / Max Laier | ICQ #67774661 > X http://pf4freebsd.love2party.net/ | mla...@efnet > / \ ASCII Ribbon Campaign | Against HTML Mail and News > > ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: sosend() and mbuf
I'm running out 7.2-RELEASE-p2 Here is my bt GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... Unread portion of the kernel message buffer: loaded. Fatal trap 12: page fault while in kernel mode cpuid = 1; apic id = 01 fault virtual address = 0x10 fault code = supervisor read, page not present instruction pointer = 0x20:0xc085935b stack pointer = 0x28:0xe6cd3a28 frame pointer = 0x28:0xe6cd3aa4 code segment= base 0x0, limit 0xf, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags= interrupt enabled, resume, IOPL = 0 current process = 1354 (test) trap number = 12 panic: page fault cpuid = 1 Uptime: 4m45s Physical memory: 1001 MB Dumping 119 MB: 104 88 72 56 40 24 8 Reading symbols from /boot/kernel/snd_hda.ko...Reading symbols from /boot/kernel/snd_hda.ko.symbols...done. done. Loaded symbols for /boot/kernel/snd_hda.ko Reading symbols from /boot/kernel/sound.ko...Reading symbols from /boot/kernel/sound.ko.symbols...done. done. Loaded symbols for /boot/kernel/sound.ko Reading symbols from /boot/kernel/if_wpi.ko...Reading symbols from /boot/kernel/if_wpi.ko.symbols...done. done. Loaded symbols for /boot/kernel/if_wpi.ko Reading symbols from /boot/kernel/wpifw.ko...Reading symbols from /boot/kernel/wpifw.ko.symbols...done. done. Loaded symbols for /boot/kernel/wpifw.ko Reading symbols from /boot/kernel/acpi.ko...Reading symbols from /boot/kernel/acpi.ko.symbols...done. done. Loaded symbols for /boot/kernel/acpi.ko Reading symbols from /boot/kernel/i915.ko...Reading symbols from /boot/kernel/i915.ko.symbols...done. done. Loaded symbols for /boot/kernel/i915.ko Reading symbols from /boot/kernel/drm.ko...Reading symbols from /boot/kernel/drm.ko.symbols...done. done. Loaded symbols for /boot/kernel/drm.ko Reading symbols from ./test.ko...done. Loaded symbols for ./test.ko #0 doadump () at pcpu.h:196 196 pcpu.h: No such file or directory. in pcpu.h (kgdb) bt #0 doadump () at pcpu.h:196 #1 0xc07e25c7 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 #2 0xc07e2899 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:574 #3 0xc0ae3efc in trap_fatal (frame=0xe6cd39e8, eva=16) at /usr/src/sys/i386/i386/trap.c:939 #4 0xc0ae4180 in trap_pfault (frame=0xe6cd39e8, usermode=0, eva=16) at /usr/src/sys/i386/i386/trap.c:852 #5 0xc0ae4b2c in trap (frame=0xe6cd39e8) at /usr/src/sys/i386/i386/trap.c:530 #6 0xc0ac923b in calltrap () at /usr/src/sys/i386/i386/exception.s:159 #7 0xc085935b in namei (ndp=0xe6cd3bc8) at /usr/src/sys/kern/vfs_lookup.c:191 #8 0xc08706d7 in vn_open_cred (ndp=0xe6cd3bc8, flagp=0xe6cd3cc4, cmode=1, cred=0xc408fc00, fp=0xc4b5b344) at /usr/src/sys/kern/vfs_vnops.c:188 #9 0xc08709a3 in vn_open (ndp=0xe6cd3bc8, flagp=0xe6cd3cc4, cmode=1, fp=0xc4b5b344) at /usr/src/sys/kern/vfs_vnops.c:94 #10 0xc086e0d3 in kern_open (td=0xc499dd20, path=0xc4c7a978 "/root/test.txt", pathseg=UIO_SYSSPACE, flags=1, mode=1) at /usr/src/sys/kern/vfs_syscalls.c:1042 #11 0xc4c7a805 in f_open () from ./test.ko #12 0xc4c7a8a1 in thread_main () from ./test.ko #13 0xc07bd079 in fork_exit (callout=0xc4c7a880 , arg=0x0, frame=0xe6cd3d38) at /usr/src/sys/kern/kern_fork.c:810 #14 0xc0ac92b0 in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:264 On Mon, Aug 3, 2009 at 10:03 PM, Dag-Erling Smørgrav wrote: > Dag-Erling Smørgrav writes: >> One thing that springs to mind is that kern_open() will dereference >> td->td_proc, and AFAIK kthread_create() does not associate the thread >> with a process. > > This is wrong, and contradicts what I wrote further down. Just ignore > it. > > DES > -- > Dag-Erling Smørgrav - d...@des.no > ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: sosend() and mbuf
No my code doesn't work, I thought it may be because that soaccept() -which is not found in man 9- is non-blocking, so i've to put my code in a thread. Now i got another problem, when I open a text file from this thread, the kernel crashes, I'm sure that its the thread. kthread_create((void *)thread_main, NULL, NULL, RFNOWAIT, 0, "thread"); void thread_main(){ struct thread *td = curthread; int ret; int fd; ret = f_open("/path/to/file.txt", &fd); printf("%d\n", ret); tsleep(td, PDROP, "test tsleep", 10*hz); f_close(fd); kthread_exit(0); } int f_open(char *filename, int *fd){ struct thread *td = curthread; int ret = kern_open(td, filename, UIO_SYSSPACE, O_RDONLY, FREAD); if(!ret){ *fd = td->td_retval[0]; return 1; } return 0; } I've to finish up this problem to go back for the first one. Can you figure out what's wrong with this code, it works when I call thread_main() rather than kthread_create((void *)thread_main, . Thanks a lot 2009/8/3 Dag-Erling Smørgrav : > [please cc: the list] > > Maslan writes: >> man 9 sosend: >> Data may be sent directly from kernel or user memory via the uio >> argument, or as an mbuf chain via top, avoid- ing a data copy. >> Only one of the uio or top pointers may be non-NULL > > Hmm, I missed that part. It never occurred to me to *not* use mbufs. > > I guess the question is: what is your question? Does your code work? > If it doesn't, where and how does it fail? If it does, why are you > asking? > > In any case, 'man 9 sosend' answers the "I can't find useful information > on sosend()" part of your email. If you still have questions after > reading that, try looking at existing kernel code that uses sosend(9) > with iovecs (or with mbufs, if you decide to go that route). > > DES > -- > Dag-Erling Smørgrav - d...@des.no > ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
sosend() and mbuf
Hello Guys, I can't find useful information on sosend(), I would like to send some plain text through sosend() Here is what i got so far, I don't know how to use mbuf with sosend() to achieve this. ret = socreate(PF_INET, &s, SOCK_STREAM, IPPROTO_TCP, curthread->td_ucred, curthread); printf("socreate -> %d\n", ret); bzero(&sa, sizeof(sa)); sa.sin_len = sizeof(sa); sa.sin_family = AF_INET; sa.sin_port = htons(); sa.sin_addr.s_addr = INADDR_ANY; sobind(s, (struct sockaddr *)&sa, curthread); printf("sobind -> %d\n", ret); ret = solisten(s, 4, curthread); printf("solisten -> %d\n", ret); ret = soaccept(s, (struct sockaddr**)&psa); printf("soaccept -> %d\n", ret); tsleep(curthread, PDROP, "kHTTP tsleep", 10*hz); /* iovec */ aiov.iov_base = buf; aiov.iov_len = strlen(buf); /* auio */ auio.uio_iov = &aiov; auio.uio_iovcnt = 1; auio.uio_offset = 0; auio.uio_resid = strlen(buf); auio.uio_rw = UIO_WRITE; auio.uio_segflg = UIO_SYSSPACE; auio.uio_td = curthread; > ret = sosend(s, (struct sockaddr*)&sa, &auio, 0, 0, 0, curthread); printf("sosend -> %d\n", ret); ret = soclose(s); printf("soclose -> %d\n", ret); Thanks a lot ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"
Re: Controlling a process
setrlimit(2) Ok thanks a lot On Tue, Dec 2, 2008 at 10:37 AM, Eygene Ryabinkin <[EMAIL PROTECTED]> wrote: > Maslan, good day. > > Tue, Dec 02, 2008 at 09:53:09AM +, Maslan wrote: >> What is the best way to control a process (running in chroot env): >> 1- Execution time >> 2- Memory limit >> And to be able to kill the process when it breaks this limits. > > man 2 setrlimit > >> Finally, i would like to know the exit status of the process or the >> signal that killed it (sigfault, .) > > If you're spawning the process in question, then 'man 2 wait'. > -- > Eygene > ____ _.--. # > \`.|\.....-'` `-._.-'_.-'` # Remember that it is hard > / ' ` , __.--' # to read the on-line manual > )/' _/ \ `-_, /# while single-stepping the kernel. > `-'" `"\_ ,_.-;_.-\_ ', fsc/as # > _.-'_./ {_.' ; / #-- FreeBSD Developers handbook >{_.-``-' {_/# > -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Controlling a process
Hi guys, What is the best way to control a process (running in chroot env): 1- Execution time 2- Memory limit And to be able to kill the process when it breaks this limits. Finally, i would like to know the exit status of the process or the signal that killed it (sigfault, .) The idea is that I'm developing a problem judge that runs FreeBSD (something like www.spoj.pl or topcoder.com/tc) Where every problem has a run-time and a memory limit. Thanks a lot -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Is there any way to increase the KVM?
Your are right PAE is for i386, i mean try running i386 freebsd with PAE enabled rather than amd64. PAE will let you access 64GB which is far than you got. On Sat, May 31, 2008 at 7:01 PM, Tz-Huan Huang <[EMAIL PROTECTED]> wrote: > On Sun, Jun 1, 2008 at 2:54 AM, Maslan <[EMAIL PROTECTED]> wrote: >> Hi, >> >> is PAE enabled in your kernel config ? > > Our server runs on amd64. I might be wrong, but I think PAE is for i386 > only, right? > > Thanks, > Tz-Huan > -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Is there any way to increase the KVM?
Hi, is PAE enabled in your kernel config ? Thanks On Sat, May 31, 2008 at 5:52 AM, Tz-Huan Huang <[EMAIL PROTECTED]> wrote: > Hi, > > Our nfs server is running 7-stable/amd64 with 8G ram, the size of zfs > pool is 12T. We have set vm.kmem_size and vm.kmem_size_max to > 1.5G, but the kernel still panics by "kmem_map too small" often. > According to [1], the limitation is not only by the loader (is it fixed now?) > but also by the default layout of KVM. [2] points a way to increase the > KVM, but we get the similar linking error. > > Is there any standard way to modify the layout of KVM? For example, we > may want to set KVM to 6G and leave the 2G for user space usage. > > Thanks, > Tz-Huan > > [1] > http://lists.freebsd.org/pipermail/freebsd-current/2007-October/077964.html > [2] http://lists.freebsd.org/pipermail/freebsd-current/2008-March/084325.html > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: vkernel & GSoC, some questions
Hi all, Aren't we working on a FreeBSD/Xen port ??? I think we don't need a Linux like KVM or DragonFly's vkernel, if we could run FreeBSD in dom0. Thank a lot On Mon, Mar 17, 2008 at 3:09 AM, Kip Macy <[EMAIL PROTECTED]> wrote: > On Sun, Mar 16, 2008 at 8:06 PM, Adrian Chadd <[EMAIL PROTECTED]> wrote: > > On 16/03/2008, Robert Watson <[EMAIL PROTECTED]> wrote: > > > > > Another avenue to consider is the Linux KVM virtualization technology, > which > > > is seeing a high level of interest in the Linux community and sounds > > > increasingly mature and well-exercised. It would also offer > interesting > > > migration benefits for Linux users wanting to try FreeBSD, allowing > them to > > > trivially create new FreeBSD installs under their existing Linux > install. We > > > had an SoC project last year but I'm not sure what the outcome was; it > would > > > be useful to give Fabio a ping and see how things are going. > Obviously, > > > anyone doing this project would need to manage the license issues > involved > > > carefully. > > > > Wasn't part of the original KVM idea to support a "hypervisor" > > interface to a parent, sort of Xen-like, providing interrupt, VM and > > inter-VM "IPC" hooks? > > > > I remember seeing this stuff a while back but for some reason all I > > read about KVM - outside of what Redhat are doing with it and Xen now > > - focuses on hardware virtualisation. > > > > A BSD-licenced KVM hypervisor + FreeBSD kernel might be an interesting > > project. I'm pretty sure Rusty wrote a very very lightweight KVM > > hypervisor as a demonstration which may serve as a starting point for > > things. > > > Nope. It is called lguest, is GPL, IBM has the rights to it and has no > interest in changing the license. > > Using KVM for architectural ideas while starting from a fresh codebase > is really the only way to go if you are concerned with licensing. > > -Kip > > > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: ATAPI dvdreader always fails on a particular DVD movie title
Hi, I got some errors like this when trying to burn a data cd/dvd. I've filled a PR : http://www.freebsd.org/cgi/query-pr.cgi?pr=119374 Machine: HP Pavilion dv6000 CD/DVD: DVDR wrote: > I tried to make a backup copy of one DVD that I own and 'dvdbackup' > always fails at a particular point. > > Running it under 'truss' I discovered that particular > 'read' operation always fails after successfully reading hundreds of MB. > > Doesn't seem to be specific to a particular DVD drive. > Out of curiosity I ordered another copy of the same DVD and it failed > in the same manner. > > Log of the relevant kernel calls: > open("/dev/acd0",O_RDONLY,05010132000) = 3 (0x3) > > > lseek(3,0x132cd800,SEEK_SET) = 321705984 (0x132cd800) > read(3,"\0\0\^A\M-:D\0\^D\0\^D\^A\^A\M^I"...,1048576) = 1048576 (0x10) > > read(3,0x2830,1048576) ERR#5 'Input/output error' > > And dmesg simultaneously gets these messages: > acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x11 ascq=0x05 > acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x11 ascq=0x05 > > So for some reason failure occurs at ~495 MB offset on the disk. > > I believe this issue is not 7.0 related since I saw it happening in 6.X > before. Also some other particular titles always have the same problem > while most titles work ok. > > Is this a known issue? > > Yuri > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Fwd: pgk_add segmentation fault
-- Forwarded message -- From: Kris Kennaway <[EMAIL PROTECTED]> Date: Nov 8, 2007 1:44 PM Subject: Re: pgk_add segmentation fault To: Maslan <[EMAIL PROTECTED]> Maslan wrote: > Hi, > > It seems that pkg_add tries to executes ldconfig which itself cause > the segmentation fault. Can you reproduce it when running that command by hand? If so, rebuild ldconfig with -ggdb and see where it is crashing. >> extract: execute '/sbin/ldconfig -m /usr/local/lib/mysql' >> extract: CWD to (null) >> Segmentation fault (core dumped) Kris -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: pgk_add segmentation fault
Hi, It seems that pkg_add tries to executes ldconfig which itself cause the segmentation fault. On Nov 8, 2007 7:44 AM, Aharon Schkolnik <[EMAIL PROTECTED]> wrote: > Hi ! > > pkg_add is crashing with a segmentation fault: > > pkg_add -v mysql-client-5.1.22.tbz > Requested space: 3809856 bytes, free space: 128323438592 bytes > in /var/tmp/instmp.ND8UBU > extract: Package name is mysql-client-5.1.22 > extract: CWD to /usr/local > extract: /usr/local/man/man1/mysql_config.1.gz > extract: /usr/local/man/man1/mysql.1.gz > extract: /usr/local/man/man1/mysqladmin.1.gz > extract: /usr/local/man/man1/mysqlbinlog.1.gz > extract: /usr/local/man/man1/mysqlcheck.1.gz > extract: /usr/local/man/man1/mysqldump.1.gz > extract: /usr/local/man/man1/mysqlimport.1.gz > extract: /usr/local/man/man1/mysqlshow.1.gz > extract: /usr/local/man/man8/mysqlmanager.8.gz > . > . > . > > extract: /usr/local/lib/mysql/libmysqlclient_r.la > extract: /usr/local/lib/mysql/libmysqlclient_r.so > extract: /usr/local/lib/mysql/libmysqlclient_r.so.16 > extract: /usr/local/share/aclocal/mysql.m4 > extract: /usr/local/share/mysql/mysql_fix_privilege_tables.sql > extract: execute '/sbin/ldconfig -m /usr/local/lib/mysql' > extract: CWD to (null) > Segmentation fault (core dumped) > > # uname -a > FreeBSD CMXHost 5.30.0170 FreeBSD 5.30.0170 #0: Thu Apr 13 14:05:14 UTC 2006 > i386 7.05.0014 > > > Any ideas ? > > TIA > -- > The day is short, and the work is great,| Aharon Schkolnik > and the laborers are lazy, and the reward | > is great, and the Master of the house is| [EMAIL PROTECTED] > impatient. - Ethics Of The Fathers Ch. 2| 054 8422076 > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: pkg_add doesn't keep dependent pkgs
That would be great. I'll wait for the patch On Nov 6, 2007 1:01 PM, Garrett Cooper <[EMAIL PROTECTED]> wrote: > Maslan wrote: > >> Package dependencies may change, depending on the user settings and > >> port maintainers configuration for the port (i.e. Makefiles). The same > >> sort of applies to packages as well. > >> Or were you referring to just packages instead of ports based > >> package metadata :)? > >> Or maybe a better question is: what are you trying to accomplish? > >> -Garrett > >> > >> > > > > The problem is that i always try FreeBSD snapshots, and each time i > > did a fresh install, i found my self in need to install xorg & gnome. > > so when i use pkg_add -rK xorg or pkg_add -rK gnome, it just keeps the > > package itself only without its dependencies, it would be better for > > me to keep the packages i use rather than downloading them every time. > > > > The ports has no problem with that, since it leaves all the port > > dependencies in /usr/ports/distfiles but i prefer packages than > > recompiling every time i install a fresh system something like gnome > > would eat my day compiling it. > > Hmm... that is indeed silly. > > Let me see if I can fire up a patch for that little issue sometime > either next week or the week after to fix that. > > -Garrett > -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: pkg_add doesn't keep dependent pkgs
> Package dependencies may change, depending on the user settings and > port maintainers configuration for the port (i.e. Makefiles). The same > sort of applies to packages as well. > Or were you referring to just packages instead of ports based > package metadata :)? > Or maybe a better question is: what are you trying to accomplish? > -Garrett > The problem is that i always try FreeBSD snapshots, and each time i did a fresh install, i found my self in need to install xorg & gnome. so when i use pkg_add -rK xorg or pkg_add -rK gnome, it just keeps the package itself only without its dependencies, it would be better for me to keep the packages i use rather than downloading them every time. The ports has no problem with that, since it leaves all the port dependencies in /usr/ports/distfiles but i prefer packages than recompiling every time i install a fresh system something like gnome would eat my day compiling it. -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
pkg_add doesn't keep dependent pkgs
Hi, pkg_add -rK seems not to keep the packages dependencies so as the package itself. i found this: http://lists.freebsd.org/pipermail/freebsd-bugbusters/2006-August/000178.html but no answer since then. I don't if this is a bug, or not even implemented feature? Thanks alot -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: ``Stopping RAM access''
> Can anyone give me a clue, how one can ``stop'' system from accessing RAM, > and then allow it again? I think this has no aim, RAM tests should be done during booting, but u could try to disable interrupts while in kernel mode 'cli' which will prevent any further context switching, then try to do whatever you want, finally enable interrupts back 'sti'. That's my two cents. I don't whether it will work or not. -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: loading a firmware image
I've attached what i did Thanks -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://developer.berlios.de/projects/libosdk ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: loading a firmware image
The firmware is bundled in a seperate kernel module that can be loaded, read and then unloaded. See src/sys/modules/iwifw/iwi_bss for an example of the Makefile magic that creates the kld. if i wrote FIRMWS = filename:shortname:version in the Makefile then i should user firmware_get("shortname") rather than firmware_register(), is it right ?? -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de/wiki/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: loading a firmware image
Have you seen the file2c(1) utility? I don't want to run into license troubles. -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de/wiki/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
loading a firmware image
Hello, What is the best way to load a firmware image (microcode) ? AFAIK I've to load the image file first in memory then call firmware_register() but my problem is how should i load the image in memory ?? Thanks alot -- System Programmer -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) -- http://libosdk.berlios.de/wiki/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Ricoh r5u870
Hi, Is there is any one working on Ricoh r5u870 webcam driver ? Ricoh r5u870 known as hp webcam. Thanks -- System Programmer I'm Searching For Perfection, So Even If U Need Potability U've To Use Assembly ;-) -- http://libosdk.berlios.de/wiki/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Problems compiling BUILDING from STABLE
Have u missed with the CFLAGS ? Sorry, i mean "messed up" --- OS Developer I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) --- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Problems compiling BUILDING from STABLE
What's my error? Have u missed with the CFLAGS ? --- OS Developer I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) --- http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
FBSD on HP Pavillion dv6000 Family
Hi all, I want to install freebsd-6.2 on my new laptop rather than win vista, but by doing some googling i found that almost everything will not work. any resources/links for drivers even if still untested, i would like to help. Thanks -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Floating-point in kernel space
It would be helpful to know why you need this support as well I just wanted to know the idea behind not having FP in kernel-space. Thanks, Maslan ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Floating-point in kernel space
Hello, I think i've seen somewhere but i don't remember that floating point arithmetic is not allowed in kernel space, if that's right, can anyone please tell why ??? and why not not emulate the floating point in kernel space ??? Thanks -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: fsck
I've got a /usr partition with some problems. During boot it fails and I'm prompted to run fsck manually. I do so and when fsck has finished it asks me to run it again, and again, and again...it seems to find the same errors each time. It never seems to repair anything. It worked fine on errors it found on the /var partition... I checked the man pages and didn't see anything pertinent. How can I fix this partition? Have your tried to run fsck in single-user mode -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: ARP Spoofing
You can use static arp entries on all the involved hosts/routers, to hardwire a MAC-address to an IP-address. This can be done with 'arp -s ' on FreeBSD. Such static arp entries will not be overridden by incoming arp replies and will ensure that outgoing IP packets are sent to the right mac address. Thanks alot Pieter, after googling i found the same solution too. -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
ARP Spoofing
Hello All I was trying to find a solution to ARP Spoofing on my local network, i've tried to use IPSTEALTH option, but this didn't help. Is there is any solution for preventing the ARP Spoofing inside the kernel such as in the tcp/ip layer or in the ethernet driver itself. i'm sorry if its not the correct mailinglist. Thanks alot -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Alternative compiler toolchain ?
There is also NwCC under BSDL but it still not as mature as gcc http://nwcc.sf.net -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Sysinstall sucks
Strange enough, since sysinstall writes to disk ONLY after you set all options and press YES. BTW at (1) you write that sysinstall had finished before your MBR was wiped out. So did sysinstall finish, or it catch the some signal? Stas It didn't run at all fdisk, it catch a some signal and crash. I didn't need to repartation since i've already 2 bsd slices each has each own partitions so i just clicked on the labeling step and make some changes to the partitions inside the already bsd slice (ad0s4). Then everything contiued normally, and the system has been installed. but i found grub (installed on MBR with files on linux ext3 partition) gives as i remember error 22, i booted my slack cd and run cfdisk and found that parititions is no longer available and marked as empty space. I used gpart and fixed the problem, and i didn't need to re-install anything. even the newly installed freebsd system was preserved. -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Sysinstall sucks
Hi I was updating my system from 5.4 to 6.1, i did a fresh install, but after sysinstall finishes it had damaged the MBR. I have 1 ext3 partitions and 2 ufs partitions, one for dfly and the other for fbsd. The other thing that during the installation i wanted to repartition, but when i click partitioning, sysintall catch a signal and terminate, i didn't really want to repartition since i've already bsd slices. I've fixed this problem with gpart and everything is ok. I just wanted to note that problem here, it may be a bug in sysinstall Thanks -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Zero Copy, FreeBSD and Linus Torvalds opinion
On 5/1/06, Dag-Erling Smørgrav <[EMAIL PROTECTED]> wrote: Allen <[EMAIL PROTECTED]> writes: > If you watch Revolution OS, Linus points out that his main thing for > doing Linux was that he wanted something like he had used at the > university he was at and he says it was SunOS. Sun OS / Solaris, are > straight BSD. Wrong. Solaris is SysV with some BSD bits tacked on. DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" That's right, but sunos (earlier than solaris) was based on bsd. www : http://en.wikipedia.org/wiki/Sunos -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Accessing SSH from a C program
> I try to copy some files securely from one machine to another. What is > the fastest and easiest way to accomplish this task? Can I access SSH > routines in C (is there a library) or is it better just to call "scp" > externally? You would better check this http://freshmeat.net/projects/libssh/ Assembler, -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org http://libosdk.berlios.de ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Config options
hi hackers, i would appreciate if any one told me how to : 1- add a new option for config. 2- disable an option without removing it. 3- re-enable a disabled option. thanks alot -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://libosdk.berlios.de http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Moving Files
On 10/4/05, John Baldwin <[EMAIL PROTECTED]> wrote: > On Monday 03 October 2005 03:24 pm, Maslan wrote: > > hello, > > i was wondering what/where changes should i do to make files when > > moving a file from directory to another in the kernel source. > > for example if want to move all /usr/src/sys/i386 , /usr/src/sys/ia64 > > in /usr/src/sys/intel/i386 and /usr/src/sys/intel/ia64. > > so can any one point me to any document or webpage that discuss this stuff > > ? thanks you very much > > The location of files that config(8) uses to generate the Makefile for a > kernel build are stored in sys/conf/files* > > -- > John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve" = http://www.FreeBSD.org > thanks that's what i was searchinf for ;-) -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Moving Files
hello, i was wondering what/where changes should i do to make files when moving a file from directory to another in the kernel source. for example if want to move all /usr/src/sys/i386 , /usr/src/sys/ia64 in /usr/src/sys/intel/i386 and /usr/src/sys/intel/ia64. so can any one point me to any document or webpage that discuss this stuff ? thanks you very much Maslan -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Bootstrapping install from GRUB
You can chian load your BSD. root (hd0,0,a) # if hd0,0 is your kernel's UFS chainloader +1 boot or you can load the loader root (hd0,0,a) kernel /boot/loader boot On 7/15/05, Ryan Nowakowski <[EMAIL PROTECTED]> wrote: > On Fri, Jul 15, 2005 at 05:19:09PM +0200, Simon 'corecode' Schubert wrote: > > Ryan Nowakowski wrote: > > >I'd like to bootstrap a FreeBSD 5.4 install from GRUB or another > > >harddrive-based bootloader without using PXEboot. > > > > > >Problem: GRUB will boot the FreeBSD loader, however I can't get > > >the loader to read a kernel from any of my existing partitions(ext2, > > >reiserfs, fat16). I know it can load a kernel from UFS but I have to > > >have FreeBSD installed to create a UFS partition(catch-22). Is there a > > >way to get a non-pxeboot loader to grab the kernel from a non-UFS > > >filesystem or perhaps the network(NFS or TFTP)? > > > > > >Suggestions? > > > > First time load the kernel via grub, not the loader. The kernel will > > complain, yet still work. After you're done installing, you can switch > > grub to use the loader. > > > Any idea what the grub parameters should be? Right now I'm booting > this and getting a "Fatal Trap 9" kernel crash during pci init. > > root (hd0,0) > kernel /boot/kernel/kernel root=/boot/mfsroot.gz > > > > > > BodyID:5353954.2.n.logpart (stored separately) > > -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Cross-Compiling FreeBSD
> Hello Maslan, > > > hi guys > > what about cross-compiling freebsd-5.4 from a different BSD as openbsd > > or even linux. > > how can i accomplish this ??? > > AFAIK, only NetBSD allows to do this with their source. I've never > heard of such a thing with FreeBSD sources. > > Regards, > -- > Jeremie Le Hen > < jeremie at le-hen dot org >< ttz at chchile dot org > > i just want to compile the sys not bin and other. But if i wanted to try, what things i should put in mind : config, gcc, binutils ? -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Cross-Compiling FreeBSD
hi guys what about cross-compiling freebsd-5.4 from a different BSD as openbsd or even linux. how can i accomplish this ??? -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
GmailFS
hello guys can not the FUSE http://fuse.sourceforge.net ported to freebsd ? it would be nice to test the gmail fs on freebsd http://richard.jones.name/google-hacks/gmail-filesystem/gmail-filesystem.html -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: To C++ or not to C++
>To quote the mailing list charter: > This is a forum for technical discussions related to FreeBSD. This is > the primary technical mailing list. It is for individuals actively > working on FreeBSD, to bring up problems or discuss alternative > solutions. Individuals interested in following the technical > discussion are also welcome. >The question made no mention of FreeBSD but was a general question on >C++ with reference to Linux. comp.lang.c++ might be a more appropriate >forum. i agree with u On 6/25/05, Erich Dollansky <[EMAIL PROTECTED]> wrote: > Hi, > > Peter Jeremy wrote: > > On Sat, 2005-Jun-25 16:37:00 +0800, Erich Dollansky wrote: > > > >>>i don't think this is the suitable mailling list to ask this question > >>> > >> > >>aren't hackers the people who have the real-life experience? > >> > >>What will a C programmer tell? > >>What will a Java programmer tell? > >> > >>Isn't it much better to ask here? > > > > > > To quote the mailing list charter: > >This is a forum for technical discussions related to FreeBSD. This is > > This was clear to me and I linked OpenSSL and NCURSES plus the compilers > to this. > > >the primary technical mailing list. It is for individuals actively > >working on FreeBSD, to bring up problems or discuss alternative > > I missed this part of it. > > >solutions. Individuals interested in following the technical > >discussion are also welcome. > > > > The question made no mention of FreeBSD but was a general question on > > C++ with reference to Linux. comp.lang.c++ might be a more appropriate > > forum. > > > How about CHAT? > > Erich > > > -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: To C++ or not to C++
i don't think this is the suitable mailling list to ask this question On 6/24/05, Seán C. Farley <[EMAIL PROTECTED]> wrote: > On Fri, 24 Jun 2005, Ryan Sommers wrote: > > > Greetings all... I'm about to undertake a major software engineering > > project and I can't decide between C or C++ and was wondering if I > > could get some input from the community. > > > > As part of this project I'm going to need to make use of at least 2 C > > libraries (OpenSSL and ncurses) and the application must be compatible > > with the standard range of Linux/UNIX compilers and operating systems. > > All of these signs make me sway closer to just doing it in C. However, > > one strong point always seems to pull me back to C++, constructors and > > destructors. > > > > Constructors and destructors can offer so much in the way of memory > > leak avoidance. Of course, each language can leak memory like a sieve > > if used improperly. However, for statically allocated structures > > semi-automatic garbage collection can be a nice cushion. > > > > Anyway, without getting into too much detail. Anyone had to make this > > choice on a project? What were your thoughts in retrospect? What would > > you have done different, what would stay the same... > > > > PS For this project things like polymorphisms and inheritance really > > aren't needed. > > If you would like to use C but want some sort of memory handling, I can > recommend using the Apache Portable Runtime (APR) in > /usr/ports/devel/apr which uses memory pools. Although I have not used > it before, there is also the Boehm Garbage Collector found in > /usr/ports/devel/boehm-gc. > > Seán > -- > [EMAIL PROTECTED] > > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > > -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: kld problem
i don't know if kld should check if the module is used or not before unloading it. but i should. On 6/22/05, Mauser <[EMAIL PROTECTED]> wrote: > Unloading syscall kernel module can cause a system crash. It occurs when we > unload the module while a process is executing our syscall. Example: > > $ cat kldtest.c > > #include > #include > #include > #include > #include > #include > #include > #include > #include > > static int test_nw; > > static int test_syscall(struct thread *td, void *arg) { > struct timeval tv; > tv.tv_sec = 15; > tv.tv_usec = 0; > tsleep(&test_nw,PWAIT,"test",tvtohz(&tv)); > return 0; > } > > static int test_offset = NO_SYSCALL; > > static struct sysent test_sysent = { > 0, test_syscall > }; > > static int test_load(struct module *mod, int cmd, void *arg) { > if(cmd != MOD_LOAD && cmd != MOD_UNLOAD) > return EOPNOTSUPP; > return 0; > } > > SYSCALL_MODULE(test,&test_offset,&test_sysent,test_load,NULL); > > $ cat calltest.c > > #include > #include > #include > #include > > int main() { > struct module_stat stat; > stat.version = sizeof(stat); > modstat(modfind("test"),&stat); > return syscall(stat.data.intval); > } > > We load the module, execute calltest, and within 15 seconds unload the > module. We get a kernel panic, because we removed the memory where our > test_syscall was located. > > Currently I don't have any idea how to fix it, but it would be nice to > inform about this issue in manual. > > Maciek > > -- > Kwiaty dla Taty.. > Wyslij bukiet na Dzien Ojca.. >> http://link.interia.pl/f1897 << > > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Screen Resolution
i think freebsd 5.3 is using Xfree86 not Xorg while 5.4 uses XOrg, but i cann't remember On 5/24/05, Max Laier <[EMAIL PROTECTED]> wrote: > On Tuesday 24 May 2005 15:16, Hervé Kergourlay wrote: > > Just one simple question on the screen resolution on FreeBSD 5.3 > > > > I change the xinitrc to launch gnome-wm and gnome-panel > > > > but I can't change the resolution in the Desktop Preferences / Screen > > Resolution tool > > only 640*480 is listed which is very small > > > > I can't change to 800*600 ? > > > > any idea ? > > > > hervé > > freebsd-hackers@ is not the right place for this kind of question, please take > it to freebsd-questions@ or maybe freebsd-x11@ > > -- > /"\ Best regards, | [EMAIL PROTECTED] > \ / Max Laier | ICQ #67774661 > X http://pf4freebsd.love2party.net/ | [EMAIL PROTECTED] > / \ ASCII Ribbon Campaign | Against HTML Mail and News > > > -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
which function
hi what and where is the function that is responsible for printing the bsd logo on startup? sorry for than question but i'm a new in hacking the bsd and my time is very limited. -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: files refused to delete
i've booted in single mode and ran fsck but this didn't fixed the problem but fsck prints the inode of the corrupted file, so i used clri and removed the inode then ran fsck again , and everything was ok. but after rebooting : 1)in multiuser: and running fsck it output an error 2)in single: and running fsck , no problem -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: files refused to delete
here is the output of fsck : ** /dev/ad0s3a (NO WRITE) ** Last Mounted on / ** Root file system ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2671 files, 44960 used, 1937879 free (703 frags, 242147 blocks, 0.0% fragmentation) ** /dev/ad0s3e (NO WRITE) ** Last Mounted on /usr ** Phase 1 - Check Blocks and Sizes INCORRECT BLOCK COUNT I=196742 (4 should be 0) CORRECT? no ** Phase 2 - Check Pathnames MISSING '.' I=197304 OWNER=maslan MODE=40755 SIZE=512 MTIME=May 5 17:30 2005 DIR=? UNEXPECTED SOFT UPDATE INCONSISTENCY CANNOT FIX, FIRST ENTRY IN DIRECTORY CONTAINS koko UNEXPECTED SOFT UPDATE INCONSISTENCY MISSING '..' I=197304 OWNER=maslan MODE=40755 SIZE=512 MTIME=May 5 17:30 2005 DIR=/home/maslan/.Trash/XY/Final/$YREX~1/trrt UNEXPECTED SOFT UPDATE INCONSISTENCY CANNOT FIX, SECOND ENTRY IN DIRECTORY CONTAINS f UNEXPECTED SOFT UPDATE INCONSISTENCY ?/fd IS AN EXTRANEOUS HARD LINK TO DIRECTORY /lost+found/#197140 REMOVE? no BAD INODE NUMBER FOR '..' I=197140 OWNER=maslan MODE=40755 SIZE=512 MTIME=Apr 11 17:32 2005 DIR=?/fd UNEXPECTED SOFT UPDATE INCONSISTENCY FIX? no ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups FREE BLK COUNT(S) WRONG IN SUPERBLK SALVAGE? no SUMMARY INFORMATION BAD SALVAGE? no BLK(S) MISSING IN BIT MAPS SALVAGE? no 223330 files, 1470245 used, 553153 free (21905 frags, 66406 blocks, 1.1% fragmentation) ** /dev/ad0s3d (NO WRITE) ** Last Mounted on /var ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2271 files, 8379 used, 485820 free (2028 frags, 60474 blocks, 0.4% fragmentation) -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: files refused to delete
here is the output of fsck : ** /dev/ad0s3a (NO WRITE) ** Last Mounted on / ** Root file system ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2671 files, 44960 used, 1937879 free (703 frags, 242147 blocks, 0.0% fragmentation) ** /dev/ad0s3e (NO WRITE) ** Last Mounted on /usr ** Phase 1 - Check Blocks and Sizes INCORRECT BLOCK COUNT I=196742 (4 should be 0) CORRECT? no ** Phase 2 - Check Pathnames MISSING '.' I=197304 OWNER=maslan MODE=40755 SIZE=512 MTIME=May 5 17:30 2005 DIR=? UNEXPECTED SOFT UPDATE INCONSISTENCY CANNOT FIX, FIRST ENTRY IN DIRECTORY CONTAINS koko UNEXPECTED SOFT UPDATE INCONSISTENCY MISSING '..' I=197304 OWNER=maslan MODE=40755 SIZE=512 MTIME=May 5 17:30 2005 DIR=/home/maslan/.Trash/XY/Final/$YREX~1/trrt UNEXPECTED SOFT UPDATE INCONSISTENCY CANNOT FIX, SECOND ENTRY IN DIRECTORY CONTAINS f UNEXPECTED SOFT UPDATE INCONSISTENCY ?/fd IS AN EXTRANEOUS HARD LINK TO DIRECTORY /lost+found/#197140 REMOVE? no BAD INODE NUMBER FOR '..' I=197140 OWNER=maslan MODE=40755 SIZE=512 MTIME=Apr 11 17:32 2005 DIR=?/fd UNEXPECTED SOFT UPDATE INCONSISTENCY FIX? no ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups FREE BLK COUNT(S) WRONG IN SUPERBLK SALVAGE? no SUMMARY INFORMATION BAD SALVAGE? no BLK(S) MISSING IN BIT MAPS SALVAGE? no 223330 files, 1470245 used, 553153 free (21905 frags, 66406 blocks, 1.1% fragmentation) ** /dev/ad0s3d (NO WRITE) ** Last Mounted on /var ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 2271 files, 8379 used, 485820 free (2028 frags, 60474 blocks, 0.4% fragmentation) On 5/4/05, Julian Elischer <[EMAIL PROTECTED]> wrote: > use ls -lo to see if there are any special flags set on the file. > man chflags for more information on the flags. > > How did you delete if from linux? last I heard the linux ufs code was > not very healthy. > maybe they fixed it.. > > > Maslan wrote: > > >when i've extract a bz2 file containing filenames in other encodings > >(arabic), > >the file names appears ??? and it refuses to delete , however i > >deleted them from linux > >but the fsck created a hard link to them in lost+found and this hard > >links refused to deleted, it also created a hard link to my home > >directory which also refused to delete. > >is this bug in bfs or in fsck ??? > > > > > > > -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
files refused to delete
when i've extract a bz2 file containing filenames in other encodings (arabic), the file names appears ??? and it refuses to delete , however i deleted them from linux but the fsck created a hard link to them in lost+found and this hard links refused to deleted, it also created a hard link to my home directory which also refused to delete. is this bug in bfs or in fsck ??? -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: about execute assembly exapmles under freebsd
hey if u need u to use linux calling way u will need to brandelf the executable (if it's elf) On 4/24/05, Tetsuji Maverick Rai <[EMAIL PROTECTED]> wrote: > I refined my code to make the binary shorter. Your code is in Linux > system call convention (ie, arguments are in eax,ebx,ecx...), however in > FreeBSD by default arguments must be pushed in the stack. > > -t.s- > .section .data > output: >.ascii "The processor Vendor ID is ''\n" > .section .text > .globl _start > _start: >xor %eax, %eax >cpuid >mov $output, %edi # load address of output in edi >movl %ebx, 28(%edi) >movl %edx, 32(%edi) >movl %ecx, 36(%edi) >pushl $42 >mov $output, %eax >pushl %eax >pushl $1 >mov $4,%eax >push %eax >int $0x80 >add $16,%esp # of course you can omit this >xor %eax,%eax # this is shorter than "pushl $0; pushl $1; mov > $1,%eax" >push %eax >inc %eax >push %eax >int $0x80 > --t.s end-- > > and it works like this: > > ---cut- > freebsd53:~/tmp% as t.s -o t.o > freebsd53:~/tmp% ld t.o -o t > freebsd53:~/tmp% ./t > The processor Vendor ID is 'GenuineIntel' > ---cut- > > > HHCHANG wrote: > > >Hi, > >I couldn't execute assembly example under freebsd . > >The environment and tools I used were (in IBM X31 box): > >1. > >bash-2.05b# uname -a > >FreeBSD sexbear.localhost 5.3-STABLE FreeBSD 5.3-STABLE #3: Sun Feb 20 > >21:55:06 UTC 2005[EMAIL PROTECTED]:/usr/obj/usr/src/sys/SEXBEAR??i386 > >2. > >bash-2.05b# as -v > >GNU assembler version 2.15 [FreeBSD] 2004-05-23 (i386-obrien-freebsd) using > >BFD version 2.15 [FreeBSD] 2004-05-23 > > > >bash-2.05b# ld -v > >GNU ld version 2.15 [FreeBSD] 2004-05-23 > > > >3.(compile and execute the example) > >bash-2.05b# > > as -gstabs -o cpuid.o cpuid.s > > ld -o cpuid cpuid.o > > cpuid (no output after executing the program) > > gdb cpuid > > (gdb) run > > Starting program: /usr/local/src/code/chap04/cpuid > > Program exited with code 0340. > > (gdb) break *_start > > (gdb) run > > Program exited with code 0340. > >###example in book### > >#cpuid.s Sample program to extract the processor Vendor ID > >.section .data > >output: > > .ascii "The processor Vendor ID is ''\n" > >.section .text > >.globl _start > >_start: > > movl $0, %eax > > cpuid > > movl $output, %edi > > movl %ebx, 28(%edi) > > movl %edx, 32(%edi) > > movl %ecx, 36(%edi) > > movl $4, %eax > > movl $1, %ebx > > movl $output, %ecx > > movl $42, %edx > > int $0x80 > > movl $1, > > %eax > > movl $0, %ebx > > int $0x80 > > > >###example in book### > > > >I viewed the tutorial: http://www.int80h.org/bsdasm/. > >but I couldn't find any syntax error in the program. > >Could someone give me a hint where I could find the more information? > >Thanks~ > > > >Regards, > >___ > >freebsd-hackers@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >To unsubscribe, send any mail to "[EMAIL PROTECTED]" > > > > > > > > -- > Tetsuji 'Maverick' Rai > PGP Key fingerprint = 2021 6BF9 CEA3 73DE FF17 B326 F4DA F04E F784 3B85 > gpg fingerprint > Aviation Jokes: http://www.geocities.com/tetsuji_rai/ > Profile http://maverick.ns1.name/ > http://maverick.IsASecret.com/ > > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > -- I'm Searching For Perfection, So Even If U Need Portability U've To Use Assembly ;-) http://www.maslanlab.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"