Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2018-05-17 08:552018-06-04 10:53
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR18Q3
StatusclosedFix in branchFixed in SCM revisionfca1e4e42285
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0038567: can get stuck sending emails

DescriptionIf email server is unresponsive, threads trying to send emails can get indefinitely stuck trying to connect to it.
Steps To Reproduce1. Configure a very slow smtp server
    You can use, ie., a fake smpt server like dumbster [1]

    and add breakpoints to simulate slowness

2. Configure Client in Openbravo to make use of it
3. Open a completed Sales Order
4. Click on send email
  -> Check the threads gets stuck while the email server is not responding:
"ajp-bio-" daemon prio=10 tid=0x00007fd2800cf800 nid=0x1f7ff runnable [0x00007fd38befb000]
   java.lang.Thread.State: RUNNABLE
    at Method)
    - locked <0x00000001efd082a0> (a
    at com.sun.mail.util.LineInputStream.readLine(
    at com.sun.mail.smtp.SMTPTransport.readServerResponse(
    at com.sun.mail.smtp.SMTPTransport.openServer(
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(
    at javax.mail.Service.connect(
    - locked <0x00000001efd083f0> (a com.sun.mail.smtp.SMTPTransport)
    at javax.mail.Service.connect(
    at javax.mail.Service.connect(
    at org.openbravo.erpCommon.utility.poc.EmailManager.sendEmail(
    at org.openbravo.erpCommon.utility.reporting.printing.PrintController.sendDocumentEmail(

[1] [^]
Proposed SolutionAs quick win, before a more complete solution is implemented by 0038524, add a hardcoded connection timeout (ie. 10min) so in case it is not possible to connect during that time, an exception will be thrown and the thread will be released.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0038524 closedjarmendariz can't configure timeout for sending emails 
depends on backport 00385683.0PR18Q2.1 closedalostale can get stuck sending emails 
depends on backport 00385693.0PR18Q1.4 closedalostale can get stuck sending emails 

-  Notes
hgbot (developer)
2018-05-17 17:23

Repository: erp/devel/pi
Changeset: fca1e4e422854d56678c04061a176e0ea257c1f0
Author: Asier Lostalé <asier.lostale <at>>
Date: Thu May 17 17:22:21 2018 +0200
URL: [^]

fixed bug 38567: can get stuck forever sending emails

  Added a fixed 10 minutes timeout for communications with smtp servers, this
  same timeout is applied to connection creation as well as reading responses
  from server. Note it is not applied to writing operations.

M src/org/openbravo/erpCommon/utility/poc/
hudsonbot (developer)
2018-05-17 21:41

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test
caristu (developer)
2018-06-04 10:53

Code reviewed + tested OK.

- Issue History
Date Modified Username Field Change
2018-05-17 08:55 alostale New Issue
2018-05-17 08:55 alostale Assigned To => alostale
2018-05-17 08:55 alostale Modules => Core
2018-05-17 08:55 alostale Triggers an Emergency Pack => No
2018-05-17 08:55 alostale Issue generated from 0038524
2018-05-17 08:55 alostale Relationship added related to 0038524
2018-05-17 08:55 alostale Status new => scheduled
2018-05-17 17:19 alostale Steps to Reproduce Updated View Revisions
2018-05-17 17:19 alostale Review Assigned To => caristu
2018-05-17 17:23 hgbot Checkin
2018-05-17 17:23 hgbot Note Added: 0104570
2018-05-17 17:23 hgbot Status scheduled => resolved
2018-05-17 17:23 hgbot Resolution open => fixed
2018-05-17 17:23 hgbot Fixed in SCM revision => [^]
2018-05-17 17:24 alostale Tag Attached: Performance
2018-05-17 21:41 hudsonbot Checkin
2018-05-17 21:41 hudsonbot Note Added: 0104582
2018-06-04 10:53 caristu Note Added: 0104906
2018-06-04 10:53 caristu Status resolved => closed
2018-06-04 10:53 caristu Fixed in Version => 3.0PR18Q3

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker