Skip to content
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

Build Freeze During Codegen #1562

Closed
deusaquilus opened this issue Aug 15, 2019 · 1 comment
Closed

Build Freeze During Codegen #1562

deusaquilus opened this issue Aug 15, 2019 · 1 comment

Comments

@deusaquilus
Copy link
Collaborator

deusaquilus commented Aug 15, 2019

Version: (e.g. 3.4.0-SNAPSHOT)
Module: (e.g. quill-jdbc)
Database: (e.g. N/A)

During a standard build the following log happens:

Streaming Test Row: 320000
Streaming Test Row: 330000
Streaming Test Row: 340000
Streaming Test Row: 350000
Streaming Test Row: 360000
Streaming Test Row: 370000
Streaming Test Row: 380000
Streaming Test Row: 390000
Streaming Test Row: 400000
Streaming Test Row: 410000
Streaming Test Row: 420000
Streaming Test Row: 430000
Streaming Test Row: 440000
Streaming Test Row: 450000
Streaming Test Row: 460000
Streaming Test Row: 470000
Streaming Test Row: 480000
Streaming Test Row: 490000
Streaming Test Row: 500000
Streaming Test Row: 510000
Streaming Test Row: 520000
Streaming Test Row: 530000
Streaming Test Row: 540000
Streaming Test Row: 550000
Streaming Test Row: 560000
Streaming Test Row: 570000
Streaming Test Row: 580000
Streaming Test Row: 590000
Streaming Test Row: 600000
Streaming Test Row: 610000
Streaming Test Row: 620000
Streaming Test Row: 630000
Streaming Test Row: 640000
Streaming Test Row: 650000
Streaming Test Row: 660000
Streaming Test Row: 670000
Streaming Test Row: 680000
Streaming Test Row: 690000
Streaming Test Row: 700000
Streaming Test Row: 710000
Streaming Test Row: 720000
Streaming Test Row: 730000
Streaming Test Row: 740000
Streaming Test Row: 750000
Streaming Test Row: 760000
Streaming Test Row: 770000
Streaming Test Row: 780000
Streaming Test Row: 790000
Streaming Test Row: 800000
Streaming Test Row: 810000
Streaming Test Row: 820000
Streaming Test Row: 830000
Streaming Test Row: 840000
Streaming Test Row: 850000
Streaming Test Row: 860000
Streaming Test Row: 870000
Streaming Test Row: 880000
Streaming Test Row: 890000
Streaming Test Row: 900000
Streaming Test Row: 910000
Streaming Test Row: 920000
Streaming Test Row: 930000
Streaming Test Row: 940000
Streaming Test Row: 950000
Streaming Test Row: 960000
Streaming Test Row: 970000
Streaming Test Row: 980000
Streaming Test Row: 990000
[info] - stream a large result set without blowing up
[info] PeopleMonixJdbcSpec:
[info] - Example 1 - differences
[info] - Example 2 - range simple
[info] - Example 3 - satisfies
[info] - Example 4 - satisfies
[info] - Example 5 - compose
[info] - Example 6 - predicate 0
[info] - Example 7 - predicate 1
[info] - Example 8 - contains empty
[info] - Example 9 - contains non empty
[info] - Example 10 - pagination
[info] - Example 11 - streaming
[info] PrepareJdbcSpec:
[info] - single
[info] - batch
[info] ProductJdbcSpec:
[info] Product
[info] - Insert multiple products
[info] - Single insert product
[info] - Single insert with inlined free variable
[info] - Single insert with free variable and explicit quotation
[info] - Single product insert with a method quotation
[info] MockTests:
[info] PrepareJdbcSpec:
[info] - single
[info] - batch
[info] Run completed in 2 minutes, 9 seconds.
[info] Total number of tests run: 9
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 9, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.

... and then the build freezes here.
When doing jstack, it appears that a database from Postgres connection is hanging during the CodegenTestCaseRunner is hanging.

At other times, the build hangs at the end of the code generation phase:

[info] /home/user/git/devdir/quill/quill-jdbc-monix/src/test/scala/io/getquill/sqlserver/ProductJdbcSpec.scala:76:31: INSERT INTO Product (description,sku) VALUES (?, ?)
[info]           i <- testContext.run(productInsert(lift(prd)))
[info]                               ^
[info] /home/user/git/devdir/quill/quill-jdbc-monix/src/test/scala/io/getquill/sqlserver/ProductJdbcSpec.scala:77:33: SELECT x2.id, x2.description, x2.sku FROM Product x2 WHERE x2.id = ?
[info]           rps <- testContext.run(productById(lift(i)))
[info]                                 ^
[info] Done compiling.
Running code generation for DBs: testH2DB, testMysqlDB, testPostgresDB, testSqliteDB, testSqlServerDB
[info] Running io.getquill.codegen.integration.CodegenTestCaseRunner /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main testH2DB testMysqlDB testPostgresDB testSqliteDB testSqlServerDB
12:32:16,143 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
12:32:16,144 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
12:32:16,144 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/home/user/git/devdir/quill/quill-codegen-jdbc/target/scala-2.11/test-classes/logback.xml]
12:32:16,144 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
12:32:16,144 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/home/user/git/devdir/quill/quill-core/target/scala-2.11/test-classes/logback.xml]
12:32:16,144 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/home/user/git/devdir/quill/quill-codegen-jdbc/src/test/resources/logback.xml]
12:32:16,144 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/home/user/git/devdir/quill/quill-codegen-jdbc/target/scala-2.11/test-classes/logback.xml]
12:32:16,183 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
12:32:16,184 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
12:32:16,189 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
12:32:16,194 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
12:32:16,213 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [io.getquill.codegen] to INFO
12:32:16,213 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to WARN
12:32:16,213 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
12:32:16,213 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
12:32:16,214 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@7bf1a5 - Registering current configuration as safe fallback point

12:32:16.356 [ForkJoinPool-1-worker-7] INFO  i.g.c.i.CodegenTestCaseRunner$ - Generating files for: testSqliteDB (sqlite) with 1-simple-snake
12:32:16.356 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - Generating files for: testSqlServerDB (sqlserver) with 1-simple-snake
12:32:16.356 [ForkJoinPool-1-worker-9] INFO  i.g.c.i.CodegenTestCaseRunner$ - Generating files for: testPostgresDB (postgres) with 1-simple-snake
12:32:16.356 [ForkJoinPool-1-worker-11] INFO  i.g.c.i.CodegenTestCaseRunner$ - Generating files for: testMysqlDB (mysql) with 1-simple-snake
12:32:16.356 [ForkJoinPool-1-worker-13] INFO  i.g.c.i.CodegenTestCaseRunner$ - Generating files for: testH2DB (h2) with 1-simple-snake
12:32:17.228 [ForkJoinPool-1-worker-5] INFO  i.g.codegen.integration.DbHelper - Cleanup:
drop table alpha.dbo."Person";
drop table bravo.dbo."Person";
drop table codegen_test.dbo."Address";
12:32:18.380 [ForkJoinPool-1-worker-5] INFO  i.g.c.u.SchemaConfig$schema_snakecase$ - Loaded content: create table Person (
  id int primary key,
  first_name varchar(255),
  last_name varchar(255),
  age int not null
);

create table Address (
  person_fk int not null,
  street varchar(255),
  zip int
);

insert into Person values (1, 'Joe', 'Bloggs', 22);
insert into Person values (2, 'Jack', 'Ripper', 33);
insert into Address values (1, '123 Someplace', 1001);
insert into Address values (1, '678 Blah', 2002);
insert into Address values (2, '111234 Some Other Place', 3333);
12:32:19.059 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - Generating files for: testSqlServerDB (sqlserver) with 2-simple-literal
12:32:19.111 [ForkJoinPool-1-worker-5] INFO  i.g.codegen.integration.DbHelper - Cleanup:
drop table codegen_test.dbo."Address";
drop table codegen_test.dbo."Person";
12:32:19.125 [ForkJoinPool-1-worker-5] INFO  i.g.c.u.SchemaConfig$schema_casesensitive$ - Loaded content: create table "Person" (
  "id" int primary key,
  "firstName" varchar(255),
  "lastName" varchar(255),
  "age" int not null
);

create table "Address" (
  "personFk" int not null,
  "street" varchar(255),
  "zip" int
);

insert into "Person" values (1, 'Joe', 'Bloggs', 22);
insert into "Person" values (2, 'Jack', 'Ripper', 33);
insert into "Address" values (1, '123 Someplace', 1001);
insert into "Address" values (1, '678 Blah', 2002);
insert into "Address" values (2, '111234 Some Other Place', 3333);
12:32:19.665 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - Generating files for: testSqlServerDB (sqlserver) with 1-comp-sanity
12:32:19.726 [ForkJoinPool-1-worker-5] INFO  i.g.codegen.integration.DbHelper - Cleanup:
drop table codegen_test.dbo."Address";
drop table codegen_test.dbo."Person";
12:32:20.201 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - Generating files for: testSqlServerDB (sqlserver) with 2-comp-stereo-single
12:32:20.261 [ForkJoinPool-1-worker-5] INFO  i.g.codegen.integration.DbHelper - Cleanup:
drop table codegen_test.dbo."Address";
drop table codegen_test.dbo."Person";
12:32:20.736 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - Generating files for: testSqlServerDB (sqlserver) with 3-comp-stereo-oneschema
12:32:20.782 [ForkJoinPool-1-worker-5] INFO  i.g.codegen.integration.DbHelper - Cleanup:
drop table codegen_test.dbo."Address";
drop table codegen_test.dbo."Person";
12:32:20.796 [ForkJoinPool-1-worker-5] INFO  i.g.c.u.SchemaConfig$schema_snakecase_twoschema_differentcolumns_differenttypes$ - Loaded content: create table Alpha.Person (
  id int primary key,
  first_name varchar(255),
  last_name varchar(255),
  age int not null,
  foo varchar(255),
  num_trinkets int, -- The other one is a bigint so output needs to be a bigint (i.e. Long) but this one is nullable so output must be nullable (i.e. Option)
  trinket_type varchar(255) not null -- Other one is an int but have to make datatype String since this one is a string. Since neither is nullable don't need Option.
);

create table Bravo.Person (
  id int primary key,
  first_name varchar(255),
  bar varchar(255),
  last_name varchar(255),
  age int not null,
  num_trinkets bigint not null,
  trinket_type int not null
);

create table Address (
  person_fk int not null,
  street varchar(255),
  zip int not null
);

insert into Alpha.Person values (1, 'Joe', 'Bloggs', 22, 'blah', 55, 'Wonkles');
insert into Alpha.Person values (2, 'Jack', 'Ripper', 33, 'blah', 66, 'Ginkles');

insert into Bravo.Person values (1, 'George', 'blah', 'Oleaf', 22, 77, 1);
insert into Bravo.Person values (2, 'Greg', 'blah', 'Raynor', 33, 88, 2);

insert into Address values (1, '123 Someplace', 1001);
insert into Address values (1, '678 Blah', 2002);
insert into Address values (2, '111234 Some Other Place', 3333);
12:32:22.162 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - Generating files for: testSqlServerDB (sqlserver) with 4-comp-stereo-twoschema
12:32:22.207 [ForkJoinPool-1-worker-5] INFO  i.g.codegen.integration.DbHelper - Cleanup:
drop table alpha.dbo."Person";
drop table bravo.dbo."Person";
drop table codegen_test.dbo."Address";
12:32:23.499 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - Generating files for: testSqlServerDB (sqlserver) with 5-comp-non-stereo-allschema
12:32:23.544 [ForkJoinPool-1-worker-5] INFO  i.g.codegen.integration.DbHelper - Cleanup:
drop table alpha.dbo."Person";
drop table bravo.dbo."Person";
drop table codegen_test.dbo."Address";
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/1-simple-snake-lib/public/Address.scala
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/1-simple-snake-lib/public/Person.scala
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/2-simple-literal-lib/public/Person.scala
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/2-simple-literal-lib/public/Address.scala
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/1-comp-sanity-lib/public/PublicExtensions.scala
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/2-comp-stereo-single-lib/public/PublicExtensions.scala
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/3-comp-stereo-oneschema-lib/public/PublicExtensions.scala
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/4-comp-stereo-twoschema-lib/common/CommonExtensions.scala
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/4-comp-stereo-twoschema-lib/public/PublicExtensions.scala
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/5-comp-non-stereo-allschema-lib/public/PublicExtensions.scala
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/5-comp-non-stereo-allschema-lib/bravo/BravoExtensions.scala
12:32:24.877 [ForkJoinPool-1-worker-5] INFO  i.g.c.i.CodegenTestCaseRunner$ - TestSqlServerDB | /home/user/git/devdir/quill/quill-codegen-tests/target/scala-2.11/src_managed/main/io/getquill/codegen/generated/sqlserver/5-comp-non-stereo-allschema-lib/alpha/AlphaExtensions.scala

... and the build hangs here.

@getquill/maintainers

@deusaquilus
Copy link
Collaborator Author

Fixed via #1560.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant