Closed Machado117 closed 1 year ago
hm, you tried 0.93.0 release version of acra and got errors. then you tried acra from master after new commits and found that it works or broken after 29eb6ff? did you try acra from master branch? is it work or not?
it's broken after 29eb6ffb20ecbefd2f7f1684ec16666c1ab6169a and still broken on master 34eabbaa0bcfd6bc312f9950efb62dda7bb6f379
okay, can you provide sql queries and db schema that you use to reproduce this problem?
Hi, I was having trouble reproducing the problem because I would run the logged query and it would run with no issues. After debugging the app I realized that the app was running a jdbc batch insert and this is what is causing trouble. I think it can be reproduced with any table. I can reproduce it with this java code:
Class.forName("org.postgresql.Driver");
String url = "jdbc:postgresql://localhost:9393/testdb";
Connection conn = DriverManager.getConnection(url, "postgres", "postgres");
PreparedStatement st = conn.prepareStatement("INSERT INTO mytable (name, age) VALUES (?, ?)");
conn.setAutoCommit(false);
st.setString(1, "name1");
st.setInt(2, 1);
st.addBatch();
st.setString(1, "name2");
st.setInt(2, 2);
st.addBatch();
st.executeBatch();
conn.commit();
st.close();
conn.close();
As long as there is more than one submitted query acra will fail.
Cool. To make it easier to start to debug it, can you provide instructions on how to build and run this java code?
Sure
import java.sql.*;
public class AcraCrash {
public static void main(String[] args) throws Exception {
Class.forName("org.postgresql.Driver");
String url = "jdbc:postgresql://localhost:9393/testdb";
Connection conn = DriverManager.getConnection(url, "postgres", "postgres");
PreparedStatement st = conn.prepareStatement("INSERT INTO mytable (name, age) VALUES (?, ?)");
conn.setAutoCommit(false);
st.setString(1, "name1");
st.setInt(2, 1);
st.addBatch();
st.setString(1, "name2");
st.setInt(2, 2);
st.addBatch();
st.executeBatch();
conn.commit();
st.close();
conn.close();
}
}
* Compile (Assuming java sdk is already installed)
`javac AcraCrash.java`
* Run the code ( You will need to download jdbc driver first https://jdbc.postgresql.org/download/)
`java -classpath .:postgresql-42.4.0.jar AcraCrash`
Great, thanks. I reproduced this error. At first glance looks like error in processing sequence of packets that contains two PARSE
packets and one BIND
packet. But BIND
packet is related to first PARSE
, but Acra tries to link it to the second one...
I will notify you when we fix it and merge it to master.
Great, thank you!
We fixed this problem in #580. You can try to build binary from the sources from master branch or build new images via make docker-build
. This fix will be included in the new version of Acrathat we plan to release soon in the next 1-2 weeks. After release will be updated images and binaries in our docker and deb/rpm repositories.
It is already fixed, so I close it. Feel free to re-open if it doesn't fix your problem.
Hi, sorry for the late reply.
I've tried the fix and it seems to be working, unfortunately when I enable encryption it stops working again. I'm using this config:
- table: mytable
columns:
- name
- age
encrypted:
- column: name
data_type: str
It seems acra is not converting the parameter type
Hello, I have been testing Acra Server 0.92.0 with an application. Version 0.92.0 seems to be working fine. I then realized I needed some features present in the 0.93.0 release but after updating I can't no longer run my application with acra.
To Reproduce
Expected behavior Application should work as before
Acra configuration files
Environment (please complete the following information):
Additional context Acra server debug logs when the application crashes
Also tried to run different commits of release 0.93.0 and this starts to happen after commit 29eb6ffb20ecbefd2f7f1684ec16666c1ab6169a