Bug 9514 - проблема с plperl
Summary: проблема с plperl
Status: CLOSED WONTFIX
Alias: None
Product: Sisyphus
Classification: Development
Component: postgresql8.1 (show other bugs)
Version: unstable
Hardware: all Linux
: P2 critical
Assignee: Ivan Fedorov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-04 18:59 MSD by Nick S. Grechukh
Modified: 2007-04-17 21:04 MSD (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick S. Grechukh 2006-05-04 18:59:08 MSD
при попытке create function получаем:
DEBUG:  ProcessUtility
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.

фрагмент серверного лога:

STATEMENT:  CREATE FUNCTION calc_score(bigint) returns bigint language plperl as
$$my $score=$_[0];if ($score > 150) { $score = round($score*(2
050-$score)/2100); } return $score;$$;
DEBUG:  00000: parse tree:
DETAIL:  {QUERY :commandType 5 :querySource 0 :canSetTag true :utilityStmt ?
        :resultRelation 0 :into <> :hasAggs false :hasSubLinks false :rtable <>
        :jointree <> :rowMarks <> :forUpdate false :rowNoWait false :targetList <>
        :groupClause <> :havingQual <> :distinctClause <> :sortClause <>
:limitOffset
        <> :limitCount <> :setOperations <> :resultRelations <>}

LOCATION:  elog_node_display, print.c:86
STATEMENT:  CREATE FUNCTION calc_score(bigint) returns bigint language plperl as
$$my $score=$_[0];if ($score > 150) { $score = round($score*(2
050-$score)/2100); } return $score;$$;
DEBUG:  00000: ProcessUtility
LOCATION:  PortalRunUtility, pquery.c:952
STATEMENT:  CREATE FUNCTION calc_score(bigint) returns bigint language plperl as
$$my $score=$_[0];if ($score > 150) { $score = round($score*(2
050-$score)/2100); } return $score;$$;
Can't open perl script "-e": No such file or directory
DEBUG:  00000: reaping dead processes
LOCATION:  reaper, postmaster.c:2111
DEBUG:  00000: server process (PID 16662) was terminated by signal 11
LOCATION:  LogChildExit, postmaster.c:2515
LOG:  00000: server process (PID 16662) was terminated by signal 11
LOCATION:  LogChildExit, postmaster.c:2515
LOG:  00000: terminating any other active server processes
LOCATION:  HandleChildCrash, postmaster.c:2396
DEBUG:  00000: sending SIGQUIT to process 16637
LOCATION:  HandleChildCrash, postmaster.c:2449
DEBUG:  00000: sending SIGQUIT to process 16638
LOCATION:  HandleChildCrash, postmaster.c:2483
LOG:  00000: all server processes terminated; reinitializing
LOCATION:  reaper, postmaster.c:2296
DEBUG:  00000: shmem_exit(0)
LOCATION:  shmem_exit, ipc.c:126
DEBUG:  00000: invoking IpcMemoryCreate(size=22577152)
LOCATION:  CreateSharedMemoryAndSemaphores, ipci.c:99
LOG:  00000: database system was interrupted at 2006-05-04 18:16:45 MSD
LOCATION:  StartupXLOG, xlog.c:4374
LOG:  00000: checkpoint record is at 1/2258ED00
LOCATION:  StartupXLOG, xlog.c:4442
LOG:  00000: redo record is at 1/2258ED00; undo record is at 0/0; shutdown TRUE
LOCATION:  StartupXLOG, xlog.c:4469
LOG:  00000: next transaction ID: 9882117; next OID: 23815241
LOCATION:  StartupXLOG, xlog.c:4472
LOG:  00000: next MultiXactId: 1; next MultiXactOffset: 0
LOCATION:  StartupXLOG, xlog.c:4475
LOG:  00000: database system was not properly shut down; automatic recovery in
progress
LOCATION:  StartupXLOG, xlog.c:4532
Comment 1 Nick S. Grechukh 2006-05-07 13:01:07 MSD
вскрытие показало, что на только 7.4, но и 8.0 этим не страдает 
Comment 2 Ivan Fedorov 2006-05-15 07:29:50 MSD
попробую что-нить придумать... скорее всего просто предложу использовать vserver
без chroot.
Comment 3 Nick S. Grechukh 2006-05-15 14:48:04 MSD
(In reply to comment #2)
> попробую что-нить придумать... скорее всего просто предложу использовать vserver
> без chroot.

то есть все так просто? но createlang отрабатывает нормально, и по словам
программера нашего - plperl 'в целом' работает.
Comment 4 Denis Smirnov 2006-05-15 14:52:49 MSD
Он не может работать в chroot, если не затащить туда целиком перл.
Comment 5 Nick S. Grechukh 2006-05-15 15:35:44 MSD
(In reply to comment #4)
> Он не может работать в chroot, если не затащить туда целиком перл.

postgresql8.0 разве не в чруте?
Comment 6 Denis Smirnov 2006-05-15 15:42:23 MSD
О чем и речь, что в чруте.
Делать вид что работает может, но работать не будет.
Потому только вытаскивать из чрута.

Или не пользоваться plperl.
Comment 7 Nick S. Grechukh 2006-05-15 15:52:52 MSD
[root@localhost ~]# vrpm whylabs.devel.tpway.com -- -qa | grep postgresql
postgresql8.0-8.0.6-alt1
postgresql8.0-server-8.0.6-alt1
postgresql8.0-perl-8.0.6-alt1

[root@localhost ~]# vrpm whylabs.devel.tpway.com -- -qi
postgresql8.0-server | grep Install
Install date: Fri May  5 15:01:26 2006      Build Host: bee1.hasher.altlinux.org

вот с 5 мая мы на нем работаем, после неудачи с 8.1.
Comment 8 Ivan Fedorov 2006-05-15 16:10:00 MSD
Даже и не знаю что сказать... я их собираю одинаково! :(
Comment 9 Ivan Fedorov 2007-04-17 21:04:20 MSD
Короче workaround - пускать PostgreSQL без chroot.