Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FDW extension patch#7

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

pramsey
Copy link

No description provided.

@ringerc
Copy link

Reminder - PostgreSQL doesn't use the github pull request process. This is just a mirror repository. Please seehttps://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F

@pramsey
Copy link
Author

Yep, but it's a useful place to visualize patches (I think). Anyways, patch is applied, now, so I can close this! :)

@pramseypramsey closed thisNov 5, 2015
rafatower referenced this pull request in CartoDB/postgresNov 23, 2016
When a subtransaction is aborted in plpython because of an SPIexception, it tries to find a matching python exception in a hash`PLy_spi_exceptions` and to make python vm raise it.That hash is generated during module initialization, but the exceptionobjects are not marked to prevent the garbage collector from collectingthem, which can lead to a segmentation fault when processing any SPIexception.PoC to reproduce the issue:```sqlCREATE OR REPLACE FUNCTION server_crashes()RETURNS VOIDAS $$    import gc    gc.collect()    plan = plpy.prepare('SELECT raises_an_spi_exception();', [])    plpy.execute(plan)$$ LANGUAGE plpythonu;CREATE OR REPLACE FUNCTION raises_an_spi_exception()RETURNS VOIDAS $$DECLARE  sql TEXT;BEGIN  sql = format('%I', NULL); -- NullValueNotAllowedEND$$ LANGUAGE plpgsql;SELECT server_crashes(); -- segfault here```Stacktrace of the problem (using PostgreSQL `REL9_5_STABLE` and python`2.7.3-0ubuntu3.8` on a Ubuntu 12.04):``` Program received signal SIGSEGV, Segmentation fault. 0x00007f3155c7670b in PyObject_Call (func=0x7f31b7db2a30, arg=0x7f31b87d17d0, kw=0x0) at ../Objects/abstract.c:2525 2525    ../Objects/abstract.c: No such file or directory. (gdb) bt #0  0x00007f3155c7670b in PyObject_Call (func=0x7f31b7db2a30, arg=0x7f31b87d17d0, kw=0x0) at ../Objects/abstract.c:2525#1  0x00007f3155d81ab1 in PyEval_CallObjectWithKeywords (func=0x7f31b7db2a30, arg=0x7f31b87d17d0, kw=0x0) at ../Python/ceval.c:3890#2  0x00007f3155c766ed in PyObject_CallObject (o=0x7f31b7db2a30, a=0x7f31b87d17d0) at ../Objects/abstract.c:2517#3  0x00007f31561e112b in PLy_spi_exception_set (edata=0x7f31b8743d78, excclass=0x7f31b7db2a30) at plpy_spi.c:547#4  PLy_spi_subtransaction_abort (oldcontext=<optimized out>, oldowner=<optimized out>) at plpy_spi.c:527#5  0x00007f31561e2185 in PLy_spi_execute_plan (ob=0x7f31b87d0cd8, list=0x7f31b7c530d8, limit=0) at plpy_spi.c:307#6  0x00007f31561e22d4 in PLy_spi_execute (self=<optimized out>, args=0x7f31b87a6d08) at plpy_spi.c:180#7  0x00007f3155cda4d6 in PyCFunction_Call (func=0x7f31b7d29600, arg=0x7f31b87a6d08, kw=0x0) at ../Objects/methodobject.c:81#8  0x00007f3155d82383 in call_function (pp_stack=0x7fff9207e710, oparg=2) at ../Python/ceval.c:4021#9  0x00007f3155d7cda4 in PyEval_EvalFrameEx (f=0x7f31b8805be0, throwflag=0) at ../Python/ceval.c:2666#10 0x00007f3155d82898 in fast_function (func=0x7f31b88b5ed0, pp_stack=0x7fff9207ea70, n=0, na=0, nk=0) at ../Python/ceval.c:4107#11 0x00007f3155d82584 in call_function (pp_stack=0x7fff9207ea70, oparg=0) at ../Python/ceval.c:4042#12 0x00007f3155d7cda4 in PyEval_EvalFrameEx (f=0x7f31b8805a00, throwflag=0) at ../Python/ceval.c:2666#13 0x00007f3155d7f8a9 in PyEval_EvalCodeEx (co=0x7f31b88aa460, globals=0x7f31b8727ea0, locals=0x7f31b8727ea0, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at ../Python/ceval.c:3253#14 0x00007f3155d74ff4 in PyEval_EvalCode (co=0x7f31b88aa460, globals=0x7f31b8727ea0, locals=0x7f31b8727ea0) at ../Python/ceval.c:667#15 0x00007f31561dc476 in PLy_procedure_call (kargs=kargs@entry=0x7f31561e5690 "args", vargs=<optimized out>, proc=0x7f31b873b2d0, proc=0x7f31b873b2d0) at plpy_exec.c:801#16 0x00007f31561dd9c6 in PLy_exec_function (fcinfo=fcinfo@entry=0x7f31b7c1f870, proc=0x7f31b873b2d0) at plpy_exec.c:61#17 0x00007f31561de9f9 in plpython_call_handler (fcinfo=0x7f31b7c1f870) at plpy_main.c:291```
roman0yurin pushed a commit to roman0yurin/postgres that referenced this pull requestMar 27, 2018
roman0yurin pushed a commit to roman0yurin/postgres that referenced this pull requestMar 27, 2018
roman0yurin pushed a commit to roman0yurin/postgres that referenced this pull requestMar 27, 2018
@pramseypramsey deleted the fdw-extension-support branchNovember 1, 2018 19:03
filiprem pushed a commit to filiprem/postgres that referenced this pull requestMar 27, 2019
`pg_catalog.pg_label` shows `labname` and `labkind`.`labname` is the name of the label.`labkind` presents `v` for vertex and `e` for edge.Closepostgres#7
@repo-lockdown
Copy link

Thanks for your Pull Request! 😄 This repo on GitHub is just a mirror of our real git repositories though, and can't really handle PRs. 😦 Hopefully you can redo the PR, and direct it to the git.postgresql.org repos? We have a developer guide, if that helps:https://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F. If this was a PR for pgAdmin, please visithttps://www.pgadmin.org/docs/pgadmin4/dev/submitting_patches.html.

@repo-lockdownrepo-lockdownbot locked and limited conversation to collaboratorsJun 17, 2019
kevinburke added a commit to kevinburke/postgres that referenced this pull requestSep 21, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@pramsey@ringerc

[8]ページ先頭

©2009-2025 Movatter.jp