-
Notifications
You must be signed in to change notification settings - Fork 60
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
call to decoderbufs__row_message__get_packed_size() in pg_decode_change() crashes #6
Comments
Only thing I can think of is Protocol Buffers and/or protobuf-c are possibly out of sync. I haven't touched this code in a couple of years, but I was able to upgrade to latest versions, re-generate the src/proto/*.{h,c} code and push through some samples. I'm not super familiar with Django so I'm not using it here to test. I did try to guess at what I thought their table definition might look like. If you have a specific CREATE TABLE statement or just drop the output of UPDATE: Forgot my versions locally are: Protocol Buffers 3.2, upgraded to proto syntax to 3 and using protobuf-c latest (1.2.1). I hope this helps! |
@xstevens, thanks for looking into this. The schema is:
How I get this is: I run python manage.py migrate, which creates all tables, constraints, etc, adding some records. Then I drop a lot of tables for the sake of privacy and simplicity. |
BTW, it is actually crashing when it is in protobuf_c.c:protobuf_c_message_get_packed_size(). But not sure what causes it. The strange thing is, after I ran migrations, I do a pg_dumpall, drop the db, restore it from that pg_dumpall, then it doesn't crash, not at first time at least, may be later. I put some printf's to at the entry and exit of that function. See the attached logs from postgres server in debug mode. It looks like when it is evaluating 17th column, which is facebook_access_token, it fails. It is null. The DDL that fails it:
|
Fail log:
|
Success case log:
|
Since pg_dumpall doesn't re-produce the problem, if you can, you can try untar'ing the whole data tree in where the data files are located. I had tar'ed /usr/local/var/postgres where homebrew install, but after I re-built postgres in debug mode, in the above examples it was in /usr/local/pgsql/data. |
I did this locally on a fresh Postgres 9.6 and it doesn't crash.
Then your INSERT statement from above:
I am running my version of the plugin and not the Debezium version on macOS 10.12.4. I still suspect its some sort of mismatch between Protocol Buffers, protobuf-c and possibly the version compiled when the Debezium plugin was made. I would update to the latest and re-compile all three of those if you haven't tried that already. Best of luck! |
@xstevens, I have the fix. Could you give permission for pull request? It is not allowing me to push the local branch to origin. Thanks. |
@nacivida Try creating a fork first and then you should be able to PR here from your fork. Side note: If you're modifying the debezium version you may want to PR their repo instead. |
@xstevens, yes, it was merged to debezium fork. |
Hi @xstevens @nacivida I've filed a bug report to the debezium fork of this repo for an error in the same function but in a different context. You can see it here: https://issues.jboss.org/browse/DBZ-790 It also causes the DB to crash and I'm not able to controllably reproduce it, yet. It happens in a live environment that has turned out to be hard to replicate. The error from the logs is: Would you guys be able to take a look at the description in the link and give any advice on what might be going on? Thanks in advance. |
I haven't been working on this since then, but I couldn't understand what's
wrong in your case.
Naci
…On Thu, Aug 2, 2018 at 6:56 AM jsyvanen ***@***.***> wrote:
Hi @xstevens <https://github.com/xstevens> @nacivida
<https://github.com/nacivida> I've filed a bug report to the debezium
branch of this repo for an error in the same function but in a different
context.
You can see it here: https://issues.jboss.org/browse/DBZ-790
It also causes the DB to crash and I'm not able to controllably reproduce
it, yet. It happens in a live environment that has turned out to be hard to
replicate.
The error from the logs is:
protobuf-c/protobuf-c.c:643: protobuf_c_message_get_packed_size: Assertion
`((message)->descriptor)->magic == 0x28aaeef9' failed.
Would you guys be able to take a look at the description in the link and
give any advice on what might be going on?
Thanks in advance.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AS_eqW1fU1t7DJvuSmGg0J9dOBeDzbveks5uMwUggaJpZM4NPuy6>
.
|
Thanks @nacivida |
This was seen when I was using a fork of decoderbufs in debezium project, please see the issue. Basically, I start with empty database and run django migrations, then the first insert causes this. Any idea what may be going on?
The text was updated successfully, but these errors were encountered: