Syllable Forum Index Syllable
Syllable Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Queue running out of memory?

 
Post new topic   Reply to topic    Syllable Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
Ronaldlees



Joined: 15 Oct 2014
Posts: 148

PostPosted: Wed Oct 22, 2014 10:42 am    Post subject: Queue running out of memory? Reply with quote

I noticed that Webster sometimes bails when loading large sites. (dailymail.co.uk for example) - but not always. My immediate response was to think that I should add swap space for the virtual memory. How do you do that on Syllable, BTW?

But, I looked at the kernel log, and found something interesting:

[code]0:Web Browser::webcore_http_worker : Error: device /boot/system/drivers/dev/battery failed to initialize itself
0:appserver::W:Cruisers & Sailing Forums : Warning: rtl8139: Memory squeeze, deferring packet.
0:appserver::W:Cruisers & Sailing Forums : Warning: rtl8139: Memory squeeze, deferring packet.
0:appserver::W:Cruisers & Sailing Forums : Warning: rtl8139: Memory squeeze, deferring packet.
0:appserver::W:Cruisers & Sailing Forums : Warning: rtl8139: Memory squeeze, deferring packet.
0:appserver::W:Cruisers & Sailing Forums : Warning: rtl8139: Memory squeeze, deferring packet.
0:appserver::W:Cruisers & Sailing Forums : Warning: rtl8139: Memory squeeze, deferring packet.
0:appserver::W:Cruisers & Sailing Forums : Warning: rtl8139: Memory squeeze, deferring packet.
0:appserver::W:Cruisers & Sailing Forums : Warning: rtl8139: Memory squeeze, deferring packet.
0:appserver::W:Cruisers & Sailing Forums : Warning: rtl8139: Memory squeeze, deferring packet.
0:Web Browser::webcore_http_worker : Warning: rtl8139: Memory squeeze, deferring packet.[/code]

This indicates that (maybe) the kernel driver's netqueue is being squeezed for memory when there is a very heavy packet load. I think that would make it a kernel space issue (I really haven't studied Syllable network drivers sufficiently to say) - and thus swap probably wouldn't fix much. Or, is this message coming from higher up the stack (rather than from the driver)? I am starting to love the way Syllable always daisy chains verbose information - even bubbling it up in kernel messages. Perhaps is takes a debugging session to figure this out. Haven't set an environment up yet though. So , what do you think about the messages? I get them when I think Webster has crashed, although it sometimes pulls out of the power dive after a long time.
Back to top
View user's profile Send private message
Ronaldlees



Joined: 15 Oct 2014
Posts: 148

PostPosted: Wed Oct 22, 2014 11:34 am    Post subject: It's the driver Reply with quote

It's the driver that's complaining. I'm beginning to see that Syllable is constructed a little bit along the same lines as Haiku. The message structures kinda give it away.

Anyway, here's the warning in the network driver code:

[code]
...
1340 } else {
1341- /* Malloc up new buffer, compatible with net-2e. */
1342- /* Omit the four octet CRC from the length. */
1343- PacketBuf_s *skb;
1344- int pkt_size = rx_size - 4;
1345-
1346- /* Allocate a common-sized skbuff if we are close. */
1347- skb = alloc_pkt_buffer(1400 < pkt_size && pkt_size < PKT_BUF_SZ-2 ?
1348- PKT_BUF_SZ : pkt_size + 2);
1349- if (skb == NULL) {

1350: printk(KERN_WARNING"%s: Memory squeeze, deferring packet.\n",

1351- dev->name);
1352- /* We should check that some rx space is free.
1353- If not, free one and mark stats->rx_dropped++. */
1354- tp->stats.rx_dropped++;
1355- break;
1356- }
1357- //skb->dev = dev;
1358- //skb_reserve(skb, 2); /* 16 byte align the IP fields. */
1359- skb->pb_nSize = 0;
[/code]

This is unrelated, but now that I've started using Vesa in 1024x768 resolution, the system seems more stable. No serious crashes today, but did have one Webster hang, which didn't bring down the system.
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2204
Location: Friesland

PostPosted: Wed Oct 22, 2014 2:12 pm    Post subject: Reply with quote

Yes, when Webster crashes, it has usually just exhausted memory before that at a high speed. Which also makes it a danger to the stability of the entire system. I always assumed it was Syllable's message queues getting filled up, probably with GUI messages, but it could also be other queues. In both cases, you're right that it's in kernel memory.

The kernel components, especially those implementing POSIX functionality, are usually quite robust. The kernel has existed for a long time, has been worked on by the most competent programmers, and is fairly mature, and most drivers are ported from mature Linux drivers. The native user space code such as the GUI system is more original and experimental, and less robust.

The kernel started out inspired by Amiga OS, but added POSIX functionality and absorbed Linux drivers. The native userspace code is modelled after the BeOS API, and that trickles down to SMP and the messaging system in the kernel. Later, OpenBeOS used AtheOS code to figure out how to implement their BeOS clone, so all in all, Haiku's architecture is indeed a lot like Syllable.

There is a skeletal virtual memory implementation for Syllable, but it doesn't work yet.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Syllable Forum Index -> Bugs All times are GMT - 6 Hours
Page 1 of 1

 
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