Hi,
in the last days I've been struggling with a problem involving the following (invalid) geometry in Oracle EE 19.21.0.0.0:
POLYGON ((1583891.58 4947283.73, 1583872.36000002 4947254.62000003, 1583871.30032193 4947253.00090655, 1583871.30032193 4947253.00090655, 1583872.36 4947254.62, 1583842.37 4947275.7, 1583830.88 4947284.25, 1583837.76000009 4947293.15000012, 1583852.79 4947312.61, 1583816.58 4947339.35, 1583796.72021844 4947356.05980049, 1583796.7 4947355.51, 1583795.86790638 4947354.1631818, 1583795.86790638 4947354.1631818, 1583796.69021944 4947355.49416928, 1583796.72096559 4947356.0783463, 1583796.7267506 4947356.18826137, 1583796.73016972 4947356.2532247, 1583796.73015088 4947356.25322746, 1583796.73013246 4947356.253234, 1583796.73011567 4947356.25324399, 1583796.73010115 4947356.25325706, 1583796.73008944 4947356.25327271, 1583796.730081 4947356.25329033, 1583796.73007614 4947356.25330926, 1583796.73007507 4947356.25332877, 1583796.76989463 4947357.18667014, 1583796.76989712 4947357.18668846, 1583796.76990294 4947357.186706, 1583796.76991189 4947357.18672218, 1583796.76992367 4947357.18673643, 1583796.76993787 4947357.18674827, 1583796.76995401 4947357.18675729, 1583796.77947994 4947357.1909803, 1583796.77949931 4947357.19098662, 1583796.77951955 4947357.19098888, 1583796.7795257 4947357.19098831, 1583797.52 4947371.26, 1583802.7 4947383.59, 1583876.87 4947330.24, 1583906.45 4947309.13, 1583891.58 4947283.73), (1583796.72096559 4947356.0783463, 1583796.72 4947356.06, 1583796.7251679 4947356.15819012, 1583796.72096559 4947356.0783463))
The problem with this polygon is in two tiny spikes located in two corners that you can see in the picture (one is in the lower right portion and the other one in the upper left portion) which are the reason of the ORA-13356 returned by SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT with tolerance 0.005.

When I try to process the polygon above with SDO_GEOM.SDO_SELF_UNION with a tolerance of 0.005, the session freezes and it can only be killed successfully by issuing KILL -9 on the underlying OS process.
My understanding is that as of Oracle 19 this type of functions are no longer executed as wrapped Java code but they are now executed as native code (C?) which explains why it's so hard to terminate the frozen session.
Now, for me this is a bug of the function.
If I increase the tolerance to 0.01, SDO_GEOM.SDO_SELF_UNION returns a geometry without the unwanted spikes, but normally we work with 0.005 and I don't see how I can work around the problem in my code if the function freezes altogether.
Is there any chance to get this fixed by submitting a request to support?
Normally they accept only valid geometries in test cases, but clearly it's a prerequisite that doesn't make any sense in this case, if the geometry was valid, I wouldn't call SDO_SELF_UNION in the first place.
Thanks,
Flavio