Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039128Openbravo ERPA. Platformpublic2018-08-13 15:052018-09-03 08:54
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
3.0PR18Q4 
AugustoMauch
Core
Automated tests
2017-07-24
pi
https://code.openbravo.com/erp/devel/pi/rev/95dcfa93d706654e1fbddfc3966bec7280081ac1 [^]
No
0039128: ant compile.apply.module task gets stuck when updating from 2.50 to pi
When updating from 2.50 release to a revision containing the changes of issue 0037064, the ant compile.apply.module task is never finishing.

See the failing job in CI: https://ci.openbravo.com/job/up-2.50topi-oracle/256/console [^]
1) hg up -C 2.50MP24
2) ant install.source
3) Run the following SQL command: delete from C_BP_CUSTOMER_ACCT where C_BP_CUSTOMER_ACCT_id in ('1000020', '1000019', '1000024', '1000022', '1000021');
4) hg up -C tip
5) ant smartbuild -Dlocal=no

Note that the compilation gets stuck at the end of the ApllyModulesTask task:
[java] 10540 [main] INFO org.openbravo.erpCommon.modules.ApplyModule - Looking for translation modules
No tags attached.
related to design defect 0039056 closed caristu Hibernate pool is being used by some ant tasks 
caused by feature request 0037064 closed caristu upgrade hibernate to 5.3.2 
related to defect 0040187 closed caristu export.database gets stuck using old pool 
related to feature request 0040552 closed caristu upgrade hibernate to version 5.4 
Issue History
2018-08-13 15:05caristuNew Issue
2018-08-13 15:05caristuAssigned To => platform
2018-08-13 15:05caristuModules => Core
2018-08-13 15:05caristuTriggers an Emergency Pack => No
2018-08-13 15:05caristuRelationship addedrelated to 0039056
2018-08-13 15:05caristuRelationship addedcaused by 0037064
2018-08-13 15:06caristuRegression level => Automated tests
2018-08-13 15:06caristuRegression date => 2017-07-24
2018-08-13 15:06caristuRegression introduced in release => pi
2018-08-13 15:06caristuRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/95dcfa93d706654e1fbddfc3966bec7280081ac1 [^]
2018-08-13 15:07caristuDescription Updatedbug_revision_view_page.php?rev_id=17526#r17526
2018-08-13 15:07caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=17528#r17528
2018-08-13 15:27caristuFile Added: issue39128.export
2018-08-20 11:06caristuAssigned Toplatform => caristu
2018-08-20 11:06caristuFile Deleted: issue39128.export
2018-08-20 11:10hgbotCheckin
2018-08-20 11:10hgbotNote Added: 0106410
2018-08-20 11:10hgbotStatusnew => resolved
2018-08-20 11:10hgbotResolutionopen => fixed
2018-08-20 11:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3ed849d672ae34b8bcec1d16aaea800ea68e5c61 [^]
2018-08-20 11:14caristuReview Assigned To => AugustoMauch
2018-08-23 04:10hudsonbotCheckin
2018-08-23 04:10hudsonbotNote Added: 0106451
2018-08-23 10:06caristuNote Added: 0106457
2018-08-23 10:07caristuNote Edited: 0106457bug_revision_view_page.php?bugnote_id=0106457#r17560
2018-09-03 08:54AugustoMauchNote Added: 0106577
2018-09-03 08:54AugustoMauchStatusresolved => closed
2018-09-03 08:54AugustoMauchFixed in Version => 3.0PR18Q4
2019-02-12 19:20caristuRelationship addedrelated to 0040187
2019-04-09 17:57caristuRelationship addedrelated to 0040552

Notes
(0106410)
hgbot   
2018-08-20 11:10   
Repository: erp/devel/pi
Changeset: 3ed849d672ae34b8bcec1d16aaea800ea68e5c61
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Aug 20 09:17:57 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3ed849d672ae34b8bcec1d16aaea800ea68e5c61 [^]

fixes bug 39128: compile.apply.module task gets stuck on 2.50 to pi updating

  The compile.apply.module ant task uses the Hibernate pool during the process of updating 2.50 to pi. Under this scenario, the task was never finishing because although all its actions were completed, the jvm was not able to terminate due to a non-daemon thread used by the Hibernate pool to validate its status.

  To avoid this problem, we force the stop of the non-daemon thread by explicitly closing the Hibernate pool once the task has finished using DAL.

---
M src/org/openbravo/erpCommon/modules/ApplyModuleTask.java
---
(0106451)
hudsonbot   
2018-08-23 04:10   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/e67e370df884 [^]
Maturity status: Test
(0106457)
caristu   
2018-08-23 10:06   
(edited on: 2018-08-23 10:07)
Reported to Hibernate, as the thread used to validate the pool should be defined as daemon:

https://hibernate.atlassian.net/browse/HHH-12921 [^]

Reported also a feature request to give a descriptive name to the thread:

https://hibernate.atlassian.net/browse/HHH-12922 [^]

Note that both issues have been already fixed:

https://github.com/hibernate/hibernate-orm/commit/6911efdfb71beff3a30162b663c308dbacca7c76 [^]

(0106577)
AugustoMauch   
2018-09-03 08:54   
Code reviewed and verified