Bug 453176

Summary: Install Packages page causes Oracle XE crash
Product: [Community] Spacewalk Reporter: Mike McCune <mmccune>
Component: WebUIAssignee: Shannon Hughes <shughes>
Status: CLOSED UPSTREAM QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 0.1CC: a.j.delaney, jasong, mmraka
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-01 10:46:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 456552    

Description Mike McCune 2008-06-27 18:05:24 UTC
From Spacewalk list:

Subject: [Spacewalk-list] Internal Server Error
Date: Tue, 24 Jun 2008 15:52:14 +0200
From: Tobias Meier <tuxx>
To: spacewalk-list

Hello,
 I get an internal Server Error when i click on the 
Software->Packages->Install Button.
This only happens if the subscribed x86_64 channel includes 2 packages 
with the same name , but for different architectures (ia32 an x86_64).
The tomcat log says:

---snip---
2008-06-24 17:47:17,776 [TP-Processor5] ERROR 
org.hibernate.transaction.JDBCTransaction - JDBC rollback failed
java.sql.SQLException: No more data to read from socket
---snip---

The Host is an RHEL5.2 System with Oracle 10.2 xe.

This page actually causes Oracle XE to crash.  The only current workaround is to
upgrade the database to Oracle 10.2.0.4 standard edition which is not Free.

Comment 1 Mike McCune 2008-06-27 18:09:16 UTC
You can reproduce it here on one of our internal systems:

https://rlx-3-24.rhndev.redhat.com/rhn/systems/details/packages/InstallPackages.do?sid=1000010000

admin/redhat

Comment 2 Chase Putans 2008-06-27 18:27:35 UTC
Same error with Spacewalk hosted on CentOS / Oracle 10.2 XE.  From catalina.out:

---snip---
[TP-Processor1] ERROR com.redhat.rhn.common.hibernate.ConnectionManager -
org.hibernate.TransactionException: Transaction not successfully started
[TP-Processor1] ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/rhn].[action] -
Servlet.service() for servlet action threw exception
java.sql.SQLException: No more data to read from socket
---snip---

This happens with any subscribed machine.  


Comment 3 Jason Ganovsky 2008-06-30 14:59:40 UTC
*** Bug 452928 has been marked as a duplicate of this bug. ***

Comment 4 Jason Ganovsky 2008-06-30 15:01:01 UTC
I've done some additional testing, and it appears this happens somewhere past
500 packages.  I loaded all the base RHEL RPM's alphabetically and the error
occurred right after loading the "g"'s

This also occurs when the packages are split among multiple channels.

Has anyone found any work arounds for this yet?

Comment 5 Michael Mráka 2008-07-01 09:11:38 UTC
Probably XE internal bug, see https://www.redhat.com/archives/spacewalk-
list/2008-June/msg00054.html

Comment 6 Michael Mráka 2008-07-01 09:33:44 UTC
Found two similar bugs filled against Oracle RDBMS 10.2.0.1, maybe one of 
workarounds will fix the issue even for XE:

---------
Bug 4350392 - Dump (qkexrInitOpn or evapls) with unnested subqueries using 
object methods

Subqueries involving object methods may dump in qkexrInitOpn or 
evapls when unnesting occurs.

Workaround: 
  Use /*+ NO_UNNEST */ hint for the sub query.
 Or 
  _optimizer_cost_based_transformation=off

This issue is fixed in	10.2.0.2 (Server Patch Set), 11.1.0.6 (Base Release)

--------------
Bug No.	4626732 ORA-00600 [EVAPLS1] - WHEN SELECTS FROM A TABLE

Customer encounters ORA-00600 [evapls1] when executing select against specific 
values with a function call within a select. 

WORKAROUND: 
alter session set optimizer_mode=rule; 
or
alter session set "_optimizer_filter_pred_pullup"=false; 

This issue is fixed in	10.2.0.2 (Server Patch Set), 11.1.0.6 (Base Release)


Comment 7 Jason Ganovsky 2008-07-01 09:37:58 UTC
If this is the solution, where can Oracle XE 10.2.0.2 be downloaded from?

Comment 8 Michael Mráka 2008-07-01 10:26:55 UTC
Bugs mentioned above are Oracle RDBMS - not XE - bugs.
XE 10.2.0.2 doesn't exist.

As the core of both db engines share the same code I assume that workarounds 
for RDBMS *should* work for XE too. 

As a quick check try 
ORACLE_SID=XE sqlplus / as sysdba
SQL> alter system set _optimizer_cost_based_transformation=off scope=memory;

and likewise for the other workarounds (use alter system not only alter 
session).


Comment 9 Chase Putans 2008-07-01 15:42:59 UTC
Did the following:

alter session set "_optimizer_filter_pred_pullup"=false;
commit;
alter system set "_optimizer_cost_based_transformation"=off scope=memory;
commit;

And the issue seems to be working again.  Can list upgradeable packages, and
installable packages for a channel that has ~2500 packages.


Comment 10 Sean 2008-07-01 21:28:11 UTC
(In reply to comment #9)
Worked here :D. You'll want to use scope=both or scope=spfile to make the change
permanent.

Comment 11 Chase Putans 2008-07-03 03:41:42 UTC
Yeah, I realized my post was a bit vague.  The fix did correct the issues I was
having.  

Comment 12 Michael Mráka 2008-08-01 10:46:39 UTC
SUMMARY:
This error is an Oracle XE internal error.
It would be probably fixed in the next XE release.

Known workaround:
# su - oracle 'ORACLE_SID=XE ; sqlplus / as sysdba'
SQL> alter system set _optimizer_cost_based_transformation=off scope=both;
SQL> quit

Comment 13 Aidan Delaney 2008-11-11 13:59:17 UTC
Known workaround:
# su - oracle 'ORACLE_SID=XE ; sqlplus / as sysdba'
SQL> alter system set "_optimizer_cost_based_transformation"=off scope=both;
SQL> quit

Note the difference from comment #12 is the quote marks around the _optimizer... string.