Re: does pthread package support kernel threads ?

2000-11-29 Thread FengYue
On Wed, 29 Nov 2000, Mohit Aron wrote: -Hi, - FreeBSD provides the pthread package (available through the -use of the option -pthread to gcc). Does this package use user-level -threads or does it use kernel threads ? I believe the kernel supports -multiple threads in the same address space

Re: crash on 4.2-stable (sendto() system call)

2000-11-28 Thread FengYue
On Thu, 23 Nov 2000, FengYue wrote: -dmesg: kvm_read: -#6 0xc01882dd in fr_makefrip (hlen=20, ip=0xc0a48fe4, fin=0xd892fb0c) -at ../../netinet/fil.c:258 -#7 0xc018e20c in fr_checkicmpmatchingstate (ip=0xc0a48fc8, -fin=0xd892fc1c) -at ../../netinet/ip_state.c:1081 Hi, I'm

Re: thread model questions

2000-11-28 Thread FengYue
On Mon, 27 Nov 2000, Alfred Perlstein wrote: - I thought it's preemptive purely at user-level since the threads are - scheduled by thread lib at user-level only. No? - -What are you asking? Give a scenario and I'll explain what should -happen. - Hmm, actually I don't know in which case it'd

Re: crash on 4.2-stable (sendto() system call)

2000-11-28 Thread FengYue
On Tue, 28 Nov 2000, FengYue wrote: -Did I find the bug causing the panic or did I miss something? Also, if it's the bug that causes the panic, the fix should be pretty simple i guess, like do something like this before the IP version check: fin_fin_v = ip-ip_v; right? To Unsubscribe: send

Re: thread model questions

2000-11-28 Thread FengYue
On Tue, 28 Nov 2000, Alfred Perlstein wrote: - Hmm, actually I don't know in which case it'd be considered as "preemptive - at kernel level"... In the case where a thread calls a syscall and gets - blocked, the entire process gets blocked not just that thread. In - the case where the syscalls

[PATCH] Re: crash on 4.2-stable

2000-11-28 Thread FengYue
After adding couple of printf() to fil.c and ip_state.c, I'm now pretty sure that ofin with initialized fin_v in ip_state.c is causing the crash. I could see that by doing a traceroute to ipv4 IP on the machine, the fin_v sometimes gets a value of 6 that makes the IPV6 code gets executed in

Re: thread model questions

2000-11-27 Thread FengYue
On Mon, 27 Nov 2000, Alfred Perlstein wrote: -* David Petrou [EMAIL PROTECTED] [001127 14:41] wrote: - thanks for the quick reply... - - 3. if preemptive, does that occur at user-level, or by the kernel? - (and how costly is it?) - - It's a mix, and very cheap. I thought it's

crash on 4.2-stable (sendto() system call)

2000-11-23 Thread FengYue
Hi, got a crash on 4.2-stable. the machine was running 4.1.1-stable and had no problem at all. 10 hours after upgrade to 4.2-stable I got a vmcore. Here it's the trace and could someone take a look, it looks like it was the sendto() call triggered the crash but I don't know how to reproduce

Re: crash on 4.2-stable (sendto() system call)

2000-11-23 Thread FengYue
On Thu, 23 Nov 2000, Alfred Perlstein wrote: -* Bosko Milekic [EMAIL PROTECTED] [001123 14:51] wrote: - - Hello, - - Can you please also get the instruction at which the page fault - occured? You can try "where" from gdb or you can get the instruction - pointer from the original

Re: Multithreaded tcp-server or non-blocking ?

2000-11-16 Thread FengYue
On Thu, 16 Nov 2000, Bakul Shah wrote: -The simplest solution is to just fork a new process on -accepting a new connection. A sample implementation is why not just bind to the port and then spawn off some processes (like 20 in his case) to do the accept(), once the accept() returns

Re: Multithreaded tcp-server or non-blocking ?

2000-11-16 Thread FengYue
On Thu, 16 Nov 2000, Bakul Shah wrote: -Yes, this is definitely simpler and preferable when servicing -a small number of concurrent requests. But you have to spawn -off as many processes as the worst case number of concurrent -requests you want to service since while all the processes -are

Re: PPPoE w/ nat auto fragmentation hack? (use tcpmssd port)

2000-11-14 Thread FengYue
On Tue, 14 Nov 2000, Renaud Waldura wrote: -Dear hackers, - - What exactly does not work? - What does the option -l do? - -When launched automatically by ppp, tcpmssd doesn't get any of the packets -and is useless. When I start it manually from the command line, it works -fine. - -I realize

Re: PPPoE w/ nat auto fragmentation hack?

2000-11-13 Thread FengYue
On Mon, 13 Nov 2000, Renaud Waldura wrote: -I wrote an article about this setup. Should be published soon enough. -http://renaud.waldura.com/doc/freebsd-pppoe/ - -I'd like to get your feedback on the section making use of tcpmssd: it -doesn't seem to work when the link is brought up

PPPoE w/ nat auto fragmentation hack?

2000-11-12 Thread FengYue
Hi, Any of you happened to hack the PPPoE support on Fbsd 4.x to automatically fragment the IP datagram if whatever device behind the NAT refuses to adjust its MTU? Thanks To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: FreeBSD vs. Linux

2000-10-21 Thread FengYue
On Sat, 21 Oct 2000, Frederik Meerwaldt wrote: -Differences... FreeBSD is a real Unix, while Linux is a ..how should I Hmmm. FreeBSD is not a UNIX, rather it's a UNIX alike OS. (Which really doesn't matter IMHO) Don't forget UNIX is a trademark of Open Group. -say... semi Unix. IMHO

anonymous memory map vs mmap on /dev/zero

2000-10-04 Thread FengYue
Hi, excluding the extra kernel calls of open()/close() on /dev/zero, which one of the following would be more efficient: 1) Using mmap on /dev/zero 2) Using mmap with MAP_ANON flag The purpose is, ofcourse, to share the memory (RW) among all child processes. It seems that mmap on /dev/zero

4.1-stable crash.

2000-10-03 Thread FengYue
Hi, could someone take a look at this crash. The box is a 4.1-stable as Sep 6th. Any hints on what could have caused the crash? This box crashs almost every 3-5 days. Thanks! ==cut here= gdb -k kernel.debug /var/crash/vmcore.0 [GDB

Re: 4.1-stable crash.

2000-10-03 Thread FengYue
On 3 Oct 2000, Dag-Erling Smorgrav wrote: - panic messages: - --- - -Where are the panic messages? Unfortunately, there is no panic messages. I compiled the kernel with -g (without DDB), and set the dumpdev in rc.conf. Did I do anything wrong? - Cannot access memory at address 0xce51d9b8. -

Re: Anyway to ipfw filter based on MAC address?

2000-08-28 Thread FengYue
Also, be able to filter packets based on TTL and SYN Seq value would be useful in some cases too -- quiet a few SYN flood programs had those values hard coded and script kids don't change them. On Mon, 28 Aug 2000, Jaye Mathisen wrote: Just exactly what I said in the Subject. I want to

SYN flood prevention methods

2000-08-26 Thread FengYue
Hi, I know this is an old topic but I don't seem to find answers to my questions in the mailing list archives. I'm wondering why FreeBSD did not implement the SYN cookies method that is currently implemented in Linux? To my best understanding, SYN cookie seems to be a better method against SYS

psmintr

2000-08-23 Thread FengYue
Hi, what does "psmintr: out of sync ( != 0008)." mean? I got tons of this message on my console and then my X-window went nearly dead. sounds like my PS/2 mouse's problem? Found the source code in isa/psm.c, but have not got any clue what could have caused this. (Have had this mouse for

Re: psmintr

2000-08-23 Thread FengYue
Forgot to mention, it's a 4.1-stable box (PIII-450, 256MB ram, 1024MB swap) On Wed, 23 Aug 2000, FengYue wrote: Hi, what does "psmintr: out of sync ( != 0008)." mean? I got tons of this message on my console and then my X-window went nearly dead. sounds like my PS/2 mouse

Re: ipfw drop packets based on SYN TTL

2000-08-14 Thread FengYue
No, TTL is in IP header while SYN FIN are TCP flags. On Mon, 14 Aug 2000, Bruce Petro wrote: Is this similar to the following kernel configuration? options TCP_DROP_SYNFIN #drop TCP packets with SYN+FIN Thanks! Bruce. To Unsubscribe: send mail to [EMAIL PROTECTED] with

linux expo san jose tomorrow

2000-08-14 Thread FengYue
hey, is there gonna be a freebsd or bsd booth there tomorrow in san jose for that linux expo thing? I may go if there is a bsd booth... To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

ipfw drop packets based on SYN TTL

2000-08-12 Thread FengYue
Hi, I need to drop packets using ipfw based on the value of TTL and the value of TTL on a 2.2.8-stable system. It seems ipfw does not support this, what options do I have? thanks To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: ipfw drop packets based on SYN TTL

2000-08-12 Thread FengYue
On Sat, 12 Aug 2000, FengYue wrote: Hi, I need to drop packets using ipfw based on the value of TTL and the value of TTL on a 2.2.8-stable system. It seems ^^^ I meant SYN To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-ha

Re: ipfw drop packets based on SYN TTL

2000-08-12 Thread FengYue
On Sat, 12 Aug 2000, Dennis wrote: At 05:34 PM 8/12/00 -0400, Bill Fumerola wrote: On Sat, Aug 12, 2000 at 12:03:15PM -0700, FengYue wrote: Hi, I need to drop packets using ipfw based on the value of TTL and the value of TTL on a 2.2.8-stable system. It seems ipfw does not support

a quick one

2000-07-28 Thread FengYue
Hi there, a quick one. Is getpeername() considered expensive? Would it be much better if I cache the result myself instead of calling it everytime on the connected socket(returned from accept) to find out which IP it connects to? Thanks To Unsubscribe: send mail to [EMAIL PROTECTED] with

libc_r/_read(), should the errno be reset to 0?

2000-06-23 Thread FengYue
in thread read() implementation, there is this line of code: while ((ret = _thread_sys_read(fd, buf, nbytes)) 0) { suppose we're doing the IO on a TCP socket: _thread_sys_read() is going to return -1 if there is no data available in the stream and the errno is then set to

RE: libc_r/_read(), should the errno be reset to 0?

2000-06-23 Thread FengYue
al Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, June 23, 2000 3:02 AM To: FengYue Cc: [EMAIL PROTECTED] Subject: Re: libc_r/_read(), should the errno be reset to 0? On Fri, 23 Jun 2000, FengYue wrote: My question is, shouldn't it be res

Re: Why this works?

2000-05-12 Thread FengYue
] [000511 22:49] wrote: [EMAIL PROTECTED] (FengYue) writes: loop. Now, the third program reads 4K of data from /tmp/pagetest and exit if the 4K data does not contain all 'A's nor 'Z's. 3 programs run concurrently on the same machine (3.4). No lock in the code whatsoever

Why this works?

2000-05-11 Thread FengYue
the call is compeleted. Is that right? I can attach the code if it's necessary. Thanks FengYue To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

mysql 3.22.32 and freebsd 4.0-stable

2000-05-08 Thread FengYue
Hello, anyone of you running mysql 3.22.32 on 4.0-stable? I'm getting a core dump on startup. I tried with the ports as well as the package from www.mysql.org. (4.0-stable as of May 7th) Here it's the backtrace, I've not got a chance to look into the source. I'm wondering if any of you have

Re: Bad memory suspected

2000-02-01 Thread FengYue
If your CPU is not overclocked, then you should pay very good attention to the motherboard if replacing memory didn't solve the problem. That happened to me once. Spent many hours and finally it turned out to be the motherboard. To Unsubscribe: send mail to [EMAIL PROTECTED] with

Re: PThreads and Sockets

1999-11-27 Thread FengYue
On Fri, 26 Nov 1999, Dan Moschuk wrote: | int sd2; | if((sd2=accept(sd, (struct sockaddr*)cad, alen)) 0) { | pthread_create(thread1, pthread_attr_default, |serverstart, sd2); | } | | Then the serverstart function: | | void *serverstart(void *ptr) | { |

Re: PThreads and Sockets

1999-11-27 Thread FengYue
On Sat, 27 Nov 1999, Rob King wrote: How would you recommend I do it? Please remember, I have no experience with pthreads, and any advice you give would be greatly appreciated. There are couple of ways you could do this: 1) pass sd2's value instead of its memory address to serverstart()