znc & znc-perl not to load perl module

Bug #1088390 reported by silent
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
znc (Ubuntu)
Invalid
Undecided
Unassigned
Lucid
Invalid
Undecided
Unassigned

Bug Description

I loaded modperl, but znc still not to load my self-made perl modules,
I wrote a module znc_ip.pm, placed it in ~/znc/modules/znc_ip.pm

but when znc starting, it only try to find znc_ip.so , not to load znc_ip.pm,
the code are tested with newer version znc in ubuntu12.04

write(1, "\33[1m\33[34m[\33[32m \33[34m]\33[39m\33["..., 63[ ] Loading Module [znc_ip]... ) = 63
stat("./", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat("./", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat("/home/xx/.znc/modules", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat(".//modules/znc_ip.so", 0x7fff50c608d0) = -1 ENOENT (No such file or directory)
stat(".//modules/extra/znc_ip.so", 0x7fff50c608d0) = -1 ENOENT (No such file or directory)
stat("/home/xx/.znc/modules/znc_ip.so", 0x7fff50c608d0) = -1 ENOENT (No such file or directory)
stat("/usr/lib/znc/znc_ip.so", 0x7fff50c608d0) = -1 ENOENT (No such file or directory)
[ !! ]1, "\33[1m\33[34m[\33[31m Unable to find m"..., 100[ Unable to find module [znc_ip] ]
) = 100
write(1, "\33[1m\33[34m[\33[31m ** \33[34m]\33[39m\33["..., 64[ ** ] Unrecoverable config error.
) = 64
close(4) = 0
close(3) = 0
exit_group(1) = ?

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: znc-perl 0.078-1
ProcVersionSignature: Ubuntu 2.6.32-45.100-server 2.6.32.60+drm33.26
Uname: Linux 2.6.32-45-server x86_64
Architecture: amd64
Date: Mon Dec 10 16:22:04 2012
InstallationMedia: Ubuntu-Server 10.04.4 LTS "Lucid Lynx" - Release amd64 (20120214.2)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: znc

Revision history for this message
silent (silent2600) wrote :
Revision history for this message
Thomas Ward (teward) wrote :

Hello, and thanks for reporting your bug!

I'm a tiny bit confused by your bug report, are you saying this works in Precise's version of ZNC, but not the version in Lucid?

Revision history for this message
silent (silent2600) wrote :
Download full text (4.2 KiB)

yes.

the detail:

xx@foo:~$ cat /etc/issue && uname -a
Ubuntu 12.04.1 LTS \n \l

Linux foo 3.2.0-34-generic-pae #53-Ubuntu SMP Thu Nov 15 11:11:12 UTC 2012 i686 athlon i386 GNU/Linux
xx@foo:~$ cat ~/.znc/configs/znc.conf
Listen = 1111
LoadModule = modperl

<User test>
        Pass = sha256#bc268003b11dcde6d2616ca214515619dbc56cce455a11e41ca5a00bfb00bff1#uyIb7r.cZ:s(NP4p-Vgh#
        Admin = true
        Nick = test
        AltNick = test_
        Ident = test
        RealName = test
        Buffer = 50
        KeepBuffer = false
        ChanModes = +stn

        LoadModule = mytest

        Server = irc.freenode.net 6667

        <Chan #test>
        </Chan>
</User>

xx@foo:~$ cat ~/.znc/modules/mytest.pm
package mytest;

use base 'ZNC::Module';

sub description {
        "my test module";
}

sub OnJoin {
    my $self = shift;
}

sub OnLoad {
    my $self = shift;
    1;
}

sub OnShutdown {
    my $self = shift;
}

1;

xx@foo:~$ znc -f
[ ok ] Opening Config [/home/xx/.znc/configs/znc.conf]...
[ ok ] Loading Global Module [modperl]... [/usr/lib/znc/modperl.so]
[ ok ] Binding to port [1111] using ipv4...
[ ** ] Loading user [test]
[ ok ] Adding Server [irc.freenode.net 6667]...
[ ] Loading Module [mytest]... Created new UUID for modperl with 'int': 1
[ ok ]/xx/.znc/modules/mytest.pm]
[ ** ] Staying open for debugging [pid: 1506]
[ ** ] ZNC 0.206+deb1 - http://znc.in
^C[ ** ] Exiting on SIG [2] ###### I pressed Ctrl -C
Unloading /home/xx/.znc/modules/mytest.pm from perl

xx@foo:~$ strace znc -f 2>&1 |grep mytest
write(1, "Loading Module [mytest]... ", 27Loading Module [mytest]... ) = 27
stat64("/home/xx/.znc/modules/mytest.pm", {st_mode=S_IFREG|0664, st_size=219, ...}) = 0
open("/home/xx/.znc/modules/mytest.pm", O_RDONLY|O_LARGEFILE) = 5
read(5, "package mytest;\n\nuse base 'ZNC::"..., 8192) = 219
stat64("/home/xx/.znc/modules/mytest.pmc", 0xbf99cfdc) = -1 ENOENT (No such file or directory)
stat64("/home/xx/.znc/modules/mytest.pm", {st_mode=S_IFREG|0664, st_size=219, ...}) = 0
open("/home/xx/.znc/modules/mytest.pm", O_RDONLY|O_LARGEFILE) = 5
read(5, "package mytest;\n\nuse base 'ZNC::"..., 8192) = 219
stat64("/home/xx/.znc/users/test/moddata/mytest", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
open("/home/xx/.znc/users/test/moddata/mytest/.registry", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
write(1, "[/home/xx/.znc/modules/mytest.pm"..., 34[/home/xx/.znc/modules/mytest.pm]
^C
xx@foo:~$

xx@ubuntu:~$ cat /etc/issue && uname -a
Ubuntu 10.04.4 LTS \n \l

Linux ubuntu 2.6.32-45-server #100-Ubuntu SMP Wed Nov 14 11:02:27 UTC 2012 x86_64 GNU/Linux
xx@ubuntu:~$ cat ~/.znc/configs/znc.conf
Listen = 1111
LoadModule = modperl

<User test>
        Pass = sha256#bc268003b11dcde6d2616ca214515619dbc56cce455a11e41ca5a00bfb00bff1#uyIb7r.cZ:s(NP4p-Vgh#
        Admin = true
        Nick = test
        AltNick = test_
        Ident = test
        RealName = test
        Buffer = 50
        KeepBuffer = false
        ChanModes = +stn

        LoadModule = mytest

        Server = irc.freenode.net 6667

        <Chan #test>
        </Chan>
</User>
xx@u...

Read more...

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Have you tried 0.092-3~lucid1 from lucid backports?

Changed in znc (Ubuntu):
status: New → Fix Released
status: Fix Released → Invalid
Revision history for this message
Thomas Ward (teward) wrote :

I'm making a few assumptions with this response, so bear with me:
(1) Your Lucid system is using the version of ZNC in the lucid repositories (and NOT the version in lucid backports)
(2) Your Precise system is using the version of ZNC in the precise repositories
(3) You wrote your module on the 0.206 version of ZNC that is in precise.

Let me first point out one thing: between 0.078-1 in Lucid, and 0.206-1 in Precise, and even between 0.206-1 in Precise and 1.0-1 in Raring, there are substantial codebase changes within ZNC. What works in 0.206 (precise) may not work in 0.078 (lucid), and what works in 1.0 (raring) will NOT work with 0.078 (lucid) because of API changes among other things, in which case if the code base changes are at fault, this isn't a bug in 0.078.

Having said this, can you try the version in lucid backports (0.092-3~lucid1) and see if the issue is replicated there? There's instructions on this page that can help enable backports in Lucid: https://help.ubuntu.com/community/UbuntuBackports

Revision history for this message
silent (silent2600) wrote : Re: [Bug 1088390] Re: znc & znc-perl not to load perl module
Download full text (3.7 KiB)

ii znc 0.092-3~lucid1 an
advanced IRC bouncer
ii znc-dev 0.092-3~lucid1 an
advanced IRC bouncer (development headers
ii znc-extra 0.092-3~lucid1 extra
modules for znc
ii znc-perl 0.092-3~lucid1 an
advanced IRC bouncer (Perl extension)

got the same error, it seems znc does not try to load any global module.

2012/12/14 Thomas Ward <email address hidden>

> I'm making a few assumptions with this response, so bear with me:
> (1) Your Lucid system is using the version of ZNC in the lucid
> repositories (and NOT the version in lucid backports)
> (2) Your Precise system is using the version of ZNC in the precise
> repositories
> (3) You wrote your module on the 0.206 version of ZNC that is in precise.
>
> Let me first point out one thing: between 0.078-1 in Lucid, and 0.206-1
> in Precise, and even between 0.206-1 in Precise and 1.0-1 in Raring,
> there are substantial codebase changes within ZNC. What works in 0.206
> (precise) may not work in 0.078 (lucid), and what works in 1.0 (raring)
> will NOT work with 0.078 (lucid) because of API changes among other
> things, in which case if the code base changes are at fault, this isn't
> a bug in 0.078.
>
> Having said this, can you try the version in lucid backports
> (0.092-3~lucid1) and see if the issue is replicated there? There's
> instructions on this page that can help enable backports in Lucid:
> https://help.ubuntu.com/community/UbuntuBackports
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1088390
>
> Title:
> znc & znc-perl not to load perl module
>
> Status in “znc” package in Ubuntu:
> Invalid
> Status in “znc” source package in Lucid:
> New
>
> Bug description:
> I loaded modperl, but znc still not to load my self-made perl modules,
> I wrote a module znc_ip.pm, placed it in ~/znc/modules/znc_ip.pm
>
> but when znc starting, it only try to find znc_ip.so , not to load
> znc_ip.pm,
> the code are tested with newer version znc in ubuntu12.04
>
> write(1, "\33[1m\33[34m[\33[32m \33[34m]\33[39m\33["..., 63[ ]
> Loading Module [znc_ip]... ) = 63
> stat("./", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
> stat("./", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
> stat("/home/xx/.znc/modules", {st_mode=S_IFDIR|0700, st_size=4096, ...})
> = 0
> stat(".//modules/znc_ip.so", 0x7fff50c608d0) = -1 ENOENT (No such file
> or directory)
> stat(".//modules/extra/znc_ip.so", 0x7fff50c608d0) = -1 ENOENT (No such
> file or directory)
> stat("/home/xx/.znc/modules/znc_ip.so", 0x7fff50c608d0) = -1 ENOENT (No
> such file or directory)
> stat("/usr/lib/znc/znc_ip.so", 0x7fff50c608d0) = -1 ENOENT (No such file
> or directory)
> [ !! ]1, "\33[1m\33[34m[\33[31m Unable to find m"..., 100[ Unable to
> find module [znc_ip] ]
> ) = 100
> write(1, "\33[1m\33[34m[\33[31m ** \33[34m]\33[39m\33["..., 64[ ** ]
> Unrecoverable config error.
> ) = 64
> close(4) = 0
> close(3) ...

Read more...

Revision history for this message
Thomas Ward (teward) wrote :

After consulting with Micah Gersten (micahg) on this bug in #ubuntu-bugs on freenode, we have come to this conclusion on this bug:

Since this is an external module/script, and not a perl script shipped with the package, this is not a bug that we can support in Ubuntu. Therefore, we are marking this bug as invalid.

Revision history for this message
Micah Gersten (micahg) wrote :

More to the point, the script written wasn't written to work with the version in lucid, therefore, there's no bug in the package in lucid.

Changed in znc (Ubuntu Lucid):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.