Skip to main content
Question

Error with UDx

  • June 20, 2019
  • 2 replies
  • 15 views

Car1os
Forum|alt.badge.img
  • Participating Frequently

Hello a customer is seeing the following error when the system has a high utilization, any ideas on how we could trace the error?

Error calling process() in User Function UDParser at [/scratch_a/release/svrtar20878/vbuild/vertica/VerticaSDK/examples/HelperLibraries/ContinuousUDL.h:213], error code: 0, message: Unknown exception caught

This is the relevant section in the header file:

static int continuousUDLRunner(ContinuousUDL *udl) {
VIAssert(udl != NULL);

    try {
        udl->state = RUN_START;
        udl->run();
        udl->state = FINISHED;
    } catch (udf_exception &e) {
        udl->exception.reset(new udf_exception(e));
        udl->state = ABORTED;

ifdef VERTICA_INTERNAL

    } catch (logged_exception &e) {
        udl->exception.reset(new logged_exception(e));
        udl->state = ABORTED;

endif

    } catch (Coroutine::CoroutineCanceled &) {
        udl->state = ABORTED;
    } catch (...) {
        udl->exception.reset(new udf_exception(0,
                    "Unknown exception caught", __FILE__, __LINE__));
        udl->state = ABORTED;
    }

    return 0;

2 replies

Bryan_H
Forum|alt.badge.img+2
  • Participating Frequently
  • June 20, 2019

Rather than printing "Unknown exception caught", they could try printing the exception and/or stack trace. At least that would work in Java, I am not sure if there is an equivalent class method in C++. Compiling with debug symbols would probably help also.

Other than that, we would need to see the run() method to get an idea what else could be going wrong. They might need to add try-catch blocks in the run() method around resource-intensive calls such as malloc() or thread ops.


Bryan_H
Forum|alt.badge.img+2
  • Participating Frequently
  • June 20, 2019

After a quick search, maybe add the following handler before the catch-all:

try {
  // (...)
} catch (const std::exception& e) { // caught by reference to base
    std::cout << " a standard exception was caught, with message '"
              << e.what() << "'\n";
}