Skip to content

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

Closed

Description

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

Activity

  1. benhillis commented on Apr 25, 2016

    @benhillis
    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?

  2. peterjuras commented on Apr 25, 2016

    @peterjuras
    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)

  3. benhillis commented on Apr 25, 2016

    @benhillis
    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.

  4. benhillis commented on Apr 25, 2016

    @benhillis
    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)

  5. fpqc commented on Apr 28, 2016

    @fpqc

    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?

  6. benhillis commented on Apr 28, 2016

    @benhillis
    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.

  7. fpqc commented on May 12, 2016

    @fpqc

    Ben Hillis (@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.

  8. sunilmut commented on Aug 10, 2016

    @sunilmut
    Member

    Peter Juras (@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...

  9. fpqc commented on Aug 10, 2016

    @fpqc

    Sunil Muthuswamy (@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.

  10. fpqc commented on Aug 28, 2016

    @fpqc

    Sunil Muthuswamy (@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.

  11. fpqc commented on Aug 31, 2016

    @fpqc

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

  12. russalex commented on Aug 31, 2016

    @russalex
    Contributor

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions