FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Linux Linking issues
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Mon Apr 12, 2004 10:51 am    Post subject: Reply with quote

With the corrections...

-- testFilePath : works

-- TestUri : works

Thanks,

John
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Mon Apr 12, 2004 11:37 am    Post subject: Reply with quote

I will send out a Beta-3 later today with all the corrections; including the memicmp() thing for linux.
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Mon Apr 12, 2004 6:10 pm    Post subject: Reply with quote

I installed beta 3. It appears that the linux make does not like the makefile when it has been created on a Windows based system (probably line ends). Easy for me to fix, though, with some backspace/returns.

HttpServer doesn't segfault anymore and seems to run. But I can't test it much beyond that. It just ouputs the usual startup stuff. Not sure what I'm supposed to see. If I point my browser to 127.0.0.1, the browser shows "HTTP ERROR: 200" in big letters if dsctest is running (if dsctest isn't running, browser can't connect). I suppose this is something. Is this what I'm expected to see?

Overall, though, looks like a lot of things are getting cleaned up. Smile

Later,
John
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Mon Apr 12, 2004 6:19 pm    Post subject: Reply with quote

JJR wrote:
HttpServer doesn't segfault anymore and seems to run. But I can't test it much beyond that. It just ouputs the usual startup stuff. Not sure what I'm supposed to see. If I point my browser to 127.0.0.1, the browser shows "HTTP ERROR: 200" in big letters if dsctest is running (if dsctest isn't running, browser can't connect). I suppose this is something.
John

Yeah, that's just my weak-assed test jigs <g>

testHttpServer() does indeed toss back an error-page, but with an HTTP-OK (200) in it. It's just any old response.

If you fire up testHttpServer() and hit <CR>, it will send itself 100,000 http request before quitting. Otherwise, it just sits there looking stupid, waiting for a request from a Browser. I have my doubts as to whether that earlier segfault really is fixed; but hey! I'll be happy if it is (I simply wrapped Socket.accept() with an appropriate 'synchronized' -- it was just a hunch).

I'm afraid my test cases are not very interesting Crying or Very sad
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Mon Apr 12, 2004 6:27 pm    Post subject: Reply with quote

Hmmm... well when I pressed <enter> nothing else happens. Just sits there in console forever. I don't think it's doing anything unless it takes a VERY long time to finish the 100,000 iterations (without displaying anything).
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Mon Apr 12, 2004 6:40 pm    Post subject: Reply with quote

JJR wrote:
Hmmm... well when I pressed <enter> nothing else happens. Just sits there in console forever. I don't think it's doing anything unless it takes a VERY long time to finish the 100,000 iterations (without displaying anything).

It may well do, depending on your machine and how efficiently the Socket stack is implemented on the particular OS.

On a old P3-866 it completes in ~57 seconds: about 1750 requests per second, and more than half of the effort is expended within the client portion of that test.

Edit: that P3 machine is a Win2K box ...
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Mon Apr 12, 2004 6:52 pm    Post subject: Reply with quote

Well, now it's seg faulting again after I press <enter> ...

I'll try a reboot.
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Mon Apr 12, 2004 7:18 pm    Post subject: Reply with quote

I think HttpServer is still pretty much a no go on Linux. CPU is 100? idle after <enter> is pressed. It's been like that for over 10 minutes on a 1.4 GHz Centrino. I wish I could see what's going on internally.

I think I'll try the win32 version on my WinXP same laptop.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Tue Apr 13, 2004 1:20 am    Post subject: Reply with quote

JJR wrote:
I think HttpServer is still pretty much a no go on Linux. CPU is 100? idle after <enter> is pressed. It's been like that for over 10 minutes on a 1.4 GHz Centrino. I wish I could see what's going on internally.

I think I'll try the win32 version on my WinXP same laptop.

CPU will certainly hit 100? for a while, but 10 minutes? That's smells to me like a spinlock for each of the worker threads. Does it do the same thing with just 1 worker thread? Also, if you wish to see what's going on, you might perhaps try printing out a "." every 64 iterations or something (in the function unittest.testClient) ?

I need to get a linux box in here ...
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Tue Apr 13, 2004 2:09 am    Post subject: Reply with quote

Um.... I think you misunderstood me... I meant that the CPU is idle. No cpu work is being done in the process at all, so far as I can see.
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Tue Apr 13, 2004 2:27 am    Post subject: Reply with quote

JJR wrote:
Um.... I think you misunderstood me... I meant that the CPU is idle. No cpu work is being done in the process at all, so far as I can see.

Yes I did, didn't I Confused 100? *idle*. In that case, the test-client is probably stalled whilst waiting for a reply from the Server (it waits for a reply on the socket). Dsc supports socket read timeouts, and the default period is 10 seconds. I guess it is only sending one request every ten seconds then, which would explain the idle CPU and the ludicrous execution period. I imagine it runs for perhaps a hundred or so requests and then the works get all gummed up somewhere.

This is where I would add some debug printf's to both unittest.testClient() and ServerThread to try and see what's going on. I'll send you something like that if you're willing to try it out?

- Kris
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Tue Apr 13, 2004 2:31 am    Post subject: Reply with quote

John, would you mind uncommenting line 942 of unittest.d, where it says Stdio.stdout.write (buf); ?

That will at least give you an idea of how far the client gets (it prints out the returned headers and HTML document).
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Tue Apr 13, 2004 2:34 am    Post subject: Reply with quote

Yep, no problem. I can test it further.

I wasn't completely clear, though. I had to manually interrupt the process with a control-c after waiting 10 mintues; that was my own human timeout period Sad . Otherwise it might have gone on forever. You are right, inserting some printf's would be very useful.

Later,

John
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Wed Apr 14, 2004 8:59 pm    Post subject: Reply with quote

Thanks primarily to John, the Socket woes have been nailed down to a simple case of running out of available socket handles. I'm working on a combination of SO_LINGER and socket.shutdown to ensure such resources are harvested asap by the OS.

- Kris
Back to top
View user's profile Send private message
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Sat Apr 17, 2004 3:32 pm    Post subject: Reply with quote

Are there any linux gurus out there who know how to increase the per-process file-handle count from the default 1024 ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group