Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weechat: Out of memory when connecting to a server #262

Closed
peterjuras opened this issue Apr 24, 2016 · 12 comments
Closed

weechat: Out of memory when connecting to a server #262

peterjuras opened this issue Apr 24, 2016 · 12 comments
Labels

Comments

@peterjuras
Copy link

Connecting to any irc server with weechat is not possibledue to a "not enough memory" error.

To reproduce:

  1. Install weechat sudo apt-get install weechat
  2. Start weechat
  3. Connect to any irc server /connect irc.freenode.net
@benhillis
Copy link
Member

Adding a link to #92.

Would it be possible for you to take an strace of weechat so I can make sure it's using the same procfs files to determine how much memory the system has?

@peterjuras
Copy link
Author

I'm not really familiar with strace, I ran strace -o file.txt weechat:

http://pastebin.com/DCKtzKgx

After weechat starts, I try to connect to an irc server, then exit after the out of memory message comes (and the connecting attempt is interrupted)

@benhillis
Copy link
Member

Thanks that was helpful. It looks like weechat may be using /proc/meminfo to determine the amount of free memory. This is the same file top uses to display the info. I'm working on a fix for this now and will see if this unblocks weechat.

@benhillis
Copy link
Member

It looks like this might actually be due to a different error, us not supporting PF_LOCAL datagram sockets.

socketpair(PF_LOCAL, SOCK_DGRAM, 0, 0x7ff5fffede20) = -1 ESOCKTNOSUPPORT (Socket type not supported)

@fpqc
Copy link

fpqc commented Apr 28, 2016

benhillis, are you planning on supporting /proc/meminfo and PF_Local datagram sockets? Weechat is one of the main pieces of software I got really excited about having available in Windows (the cygwin builds just don't work right). Also, do you have anything planned like an Lxsvchost for running the Ubuntu Daemons as Windows services?

@benhillis
Copy link
Member

@fpqc - /proc/meminfo is an interesting one. Unix and NT have different memory manager semantics so it will be hard (or impossible) to report accurate numbers for every field. That being said, I recently made a change to at least report the following fields: MemTotal, MemFree, SwapTotal, SwapFree. Note Swap* numbers will be reporting the NT page file size and usage. These are two of the main fields top and htop use to display memory usage information.

Let me sync up with the developer that worked on unix (PF_LOCAL) sockets and see what his thoughts are on adding support for datagrams.

@fpqc
Copy link

fpqc commented May 12, 2016

@benhillis I know how busy you guys are, but did you find anything else out about getting weechat to run (the PF_local datagrams, I guess, since it looks like you have /proc/meminfo working now)? I tried it on the latest build (just installed an hour ago) and got the same result.

PS\ Very happy that in the latest insider build, zsh installs properly.

@sunilmut
Copy link
Member

@peterjuras - I am looking into AF_UNIX\SOCK_DGRAM support in WSL. With the initial code, it looks like I am able to get past the above error in 'weechat'. But, the connect command seems to be timing out. I also tried weechat on my native Ubuntu setup and I am not able to get it to connect as well. Here is what I am trying, please let me know if I am missing something:
sudo apt-get install weechat weechat /connect irc.freenode.net

I even tried adding a server by using the /server add freenode chat.freenode.net command and then connect, but no luck.

17:03:06 freenode -- | irc: connecting to server chat.freenode.net/6667... 17:03:54 oftc =!= | irc: timeout 17:03:54 oftc -- | irc: reconnecting to server in 10 seconds 17:04:04 oftc -- | irc: reconnecting to server... 17:04:04 oftc -- | irc: connecting to server irc.oftc.net/6697 (SSL)... 17:04:06 freenode =!= | irc: timeout 17:04:06 freenode -- | irc: reconnecting to server in 10 seconds 17:04:16 freenode -- | irc: reconnecting to server... 17:04:16 freenode -- | irc: connecting to server chat.freenode.net/6667...

@fpqc
Copy link

fpqc commented Aug 10, 2016

@sunilmut I made a new shell account on my vps, which is running CentOS 7 with a git-built version of Weechat 1.6-dev from last month, and here is how I connected:

fpqc@box > ~ > weechat
(weechat launches)
/server add freenode chat.freenode.net
/connect freenode

and it worked alright.

I don't have a copy of Ubuntu 14.04 with their package installed anywhere, but I expect it should work the same. If you can't get it to connect on your native Ubuntu setup, maybe see if you can get it to start on the git-devel version? You're typing in the commands correctly.

The same sequence of operations works also on my friend's freebsd VPS in a new shell with Weechat 1.3.

@fpqc
Copy link

fpqc commented Aug 28, 2016

@sunilmut So by the way, I know this was one of your test cases for AF_UNIX, SOCK_DGRAM, and I am aware you have the big fix on the way. Just wondering if you got Weechat running, or if it ended up failing somewhere else.

@fpqc
Copy link

fpqc commented Aug 31, 2016

@russalex Hi, this is now fixed in 14915. Just notifying you =).

@russalex russalex added the fixed label Aug 31, 2016
@russalex
Copy link
Contributor

Thanks!

@russalex russalex closed this as completed Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants